zsh-workers
 help / color / mirror / code / Atom feed
* Space after completion disappears
@ 2009-04-21  5:11 Michael Hwang
  2009-04-21  7:03 ` Bart Schaefer
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Hwang @ 2009-04-21  5:11 UTC (permalink / raw)
  To: zsh-workers


When a file is tab completed, and you didn't have to select from a menu, a space is added immediately after the file. However, typing another character that denotes the end of that command--ampersand, semi-colon, vertical pipe--causes the space to be erased. I would expect the semi-colon to have this behavior, but not the ampersand or the pipe. Consider these keystrokes in a directory with a single file 'foobar':

% touch foo<TAB>;
After the tab, the line reads "touch foobar " (note the trailing space). Typing ";" after it removes the space, and you get "touch foobar;", which is desired. However...

% rm foo<TAB>&
I want to background the rm command. After hitting tab, I see "rm foobar " (trailing space again). Pressing "&" deletes the space, and you see "rm foobar&". It would be better if it left the space, showing "rm foobar &". Both "rm foobar&" and "rm foobar &" do exactly the same thing, but the second one is preferred. The pipe is the same:

% cat foo<TAB>| sed ....
Ignore the useless use of cat. After typing the pipe, you get "cat foobar| sed ...." and not "cat foobar | sed ....". The second is preferable because it is neater.

I tried to squash the bug myself, but got hopelessly confused looking through ZLE code. I'm reporting it in the hope that someone else will fix it.

Michael Hwang



      


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

end of thread, other threads:[~2009-04-23 10:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-21  5:11 Space after completion disappears Michael Hwang
2009-04-21  7:03 ` Bart Schaefer
2009-04-22 15:28   ` Michael Hwang
2009-04-22 16:04     ` Peter Stephenson
2009-04-22 17:07       ` Greg Klanderman
2009-04-23  9:31         ` Peter Stephenson
2009-04-23 10:43           ` Peter Stephenson

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).