zsh-workers
 help / color / mirror / code / Atom feed
* jumping ampersands?
@ 2005-07-15 11:23 Eric De Mund
  2005-07-15 14:54 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Eric De Mund @ 2005-07-15 11:23 UTC (permalink / raw)
  To: zsh-workers

People,

Why do some ampersands placed after single-word commands
(e.g. "% ooffice &", and "% xmms &") jump one space to the left (e.g. to
"% ooffice&", and "% xmms&") upon my hitting the enter key? I've been
using Zsh for about 15 years, now, and I believe this is the first time
I've ever observed behavior that I didn't explicitly call for or impli-
citly (such as with options) call for.

This ampersand jumping:

1.  is intermittent;
2.  only seems to occur with single-word commands (i.e. the two-word
      command "% ooffice foo.sxw &" remains as is upon my hitting the
      enter key);
3.  only occurs in local rxvt(1) rather than remote ssh(1) shells (both
      of which use identical ~/.z* startup files);

My environment--along with pointers to all my ~/.z* startup files--is:

/-----------------------------
% uname -a
Linux patagonia 2.4.18-bf2.4 #1 Son Apr 14 09:53:28 CEST 2002 i686 GNU/Linux
% cat /etc/debian_version
3.1
% echo $myrxvt_ARGLIST
-fg rgb:00/00/00 -bg rgb:dd/93/5d -g 80x48 -fn 7x14 --cutchars \<\> -si \
+sk -sl 3000 -sr -st      -vb
% echo $ZSH_VERSION
4.2.5
% setopt
allexport
autocd
noautolist
nobeep
nobgnice
correctall
extendedglob
histignoredups
nohup
ignoreeof
interactive
interactivecomments
longlistjobs
markdirs
menucomplete
monitor
nonomatch
pathdirs
pushdsilent
shinstdin
zle
% lynx -dump http://www.ixian.com/ead/tmp/
                             my Zsh startup files

     * [1].zlogin
     * [2].zlogin.aux
     * [3].zlogout
     * [4].zshenv
     * [5].zshrc

References

   1. http://www.ixian.com/ead/tmp/.zlogin
   2. http://www.ixian.com/ead/tmp/.zlogin.aux
   3. http://www.ixian.com/ead/tmp/.zlogout
   4. http://www.ixian.com/ead/tmp/.zshenv
   5. http://www.ixian.com/ead/tmp/.zshrc
% 
\-----------------------------

Thank you. I'll happily assist in any way I can in the debugging of
this.

Eric
--
Eric De Mund
email: <ead@ixian.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: jumping ampersands?
  2005-07-15 11:23 jumping ampersands? Eric De Mund
@ 2005-07-15 14:54 ` Bart Schaefer
  2005-07-16 14:21   ` Eric De Mund
  0 siblings, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 2005-07-15 14:54 UTC (permalink / raw)
  To: Eric De Mund, zsh-workers

On Jul 15,  4:23am, Eric De Mund wrote:
}
} Why do some ampersands placed after single-word commands
} jump one space to the left

Actually it's ampersands (and vertical bars) typed immediately after
words that were filled in by using completion which move as a result
of the auto-removal of the previously auto-added trailing space.

If you're seeing things move around in any case where you did not use
completion, something unusual is happening.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: jumping ampersands?
  2005-07-15 14:54 ` Bart Schaefer
@ 2005-07-16 14:21   ` Eric De Mund
  2005-07-16 15:09     ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Eric De Mund @ 2005-07-16 14:21 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-workers

Bart,

Eric De Mund <ead@ixian.com> to <zsh-workers@sunsite.dk>:
] Why do some ampersands placed after single-word commands jump one
] space to the left

Bart Schaefer <schaefer@brasslantern.com>:
] Actually it's ampersands (and vertical bars) typed immediately after
] words that were filled in by using completion which move as a result
] of the auto-removal of the previously auto-added trailing space.

Thank you; this is, indeed, when and only when it happens.

Is this behavior option-settable? It represents an aesthetic that I just
don't share; I strongly prefer a space character between commands and
any following &'s, &&'s, and ||'s.

Regards,
Eric
--
Eric De Mund <ead@ixian.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: jumping ampersands?
  2005-07-16 14:21   ` Eric De Mund
@ 2005-07-16 15:09     ` Bart Schaefer
  0 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 2005-07-16 15:09 UTC (permalink / raw)
  To: Eric De Mund; +Cc: zsh-workers

On Jul 16,  7:21am, Eric De Mund wrote:
} Subject: Re: jumping ampersands?
}
} Bart Schaefer <schaefer@brasslantern.com>:
} ] the auto-removal of the previously auto-added trailing space.
} 
} Is this behavior option-settable?

Unfortunately, it's not settable in a way that you'd find useful.

You can turn off auto-removal, but that turns off auto-removal of all
suffixes (including most notably slashes after directory names), not
just spaces and not exclusively before semicolon/ampersand/bar, and
you *can't* turn off the auto-addition of the space.

The completion system supports using a shell function to decide what
to remove, but its name must be explicitly passed to the compadd
builtin; one function can't be applied generically to all completions.

} It represents an aesthetic that I just don't share; I strongly prefer
} a space character between commands and any following &'s, &&'s, and
} ||'s.

I share your sentiment.  The only thing I can immediately suggest is
that you train your fingers to type the space even if completion has
already added one.  Typing the space will cause the auto-added space
to be removed and replaced by the one you type, so the net effect is
invisible except that auto-removal will not thereafter occur.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-07-16 15:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-15 11:23 jumping ampersands? Eric De Mund
2005-07-15 14:54 ` Bart Schaefer
2005-07-16 14:21   ` Eric De Mund
2005-07-16 15:09     ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).