Zsh Mailing List Archive
Messages sorted by:
Space after completion disappears
- X-seq: zsh-workers 26856
- From: Michael Hwang <nomex45@xxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Space after completion disappears
- Date: Mon, 20 Apr 2009 22:11:50 -0700 (PDT)
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1240290710; bh=ugHxZT/ld6Z6Br60qOfBhizqwyawWh+UkYF/qi48Uv8=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=j1WAIszmighTdSl0WOs9AMtQYdoAuRe8is0+xv+ETdMKVLNtgsEMlBrPsAJr1ngVDzNEbQYRbeVVJXnj37BomCX3VBzbYa3CU5E+Bb5Ej6EdKKnYDYUalnylpWJNGffEvph65S86p7iHEo11AwMffhFyVlKwAhkfuS2/nfbPw7o=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=x7OGYwPwt8wNQhE1pCuH3bDUIBYKL7TtT9Zvh0QC8ExxAKanFj3BoncQqYk3Mw7UvM1XJf2Todjb5PqSSG8PdbJiwBZM/9/y20STNV21hcvJ70JEqTH6ctl2arBODX9qS32QzCA7MQUEHIgUU3dEkoenn/vN6iY3Ag7SFBveykk=;
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
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.
Messages sorted by: