Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: 4.0.1: menucomplete quirk leaving extra characters behind

On Jun 12,  3:37pm, Jos Backus wrote:
> Now when I hit <Tab>, I see:
> traitor% \!
> zsh: do you wish to see all 2188 possibilities (730 lines)? _
> Answering ``n'' gives:
> traitor% \!_

There's a reserved word `!' that's valid in command position.  It means
to negate the exit status of whatever command comes next.  You generally
use it like this:

	if ! othercommand; then ...; fi

So that happens to be the first item in the menu.  You asked zsh not to
list the rest of the menu, but you're still in menu completion, so if you
start pressing TAB repeatedly, you'll cycle through the rest of the words
that are valid in command position, most of which are external commands.

> (Btw, on Solaris the characters are ``!='' instead.)

That's what I see after pressing TAB twice; it's the next word in the menu
and it's the first part of a parameter assignment to the `!' parameter.  If
I keep on hitting TAB I see #= and $= and *=.  This is actually a bug, I
guess, because those parameters are read-only and so you shouldn't be able
to complete them on the left side of an assignment, but menucompletion is
not itself malfunctioning.

Are you sure you didn't hit TAB more than once on Solaris?
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   

Messages sorted by: Reverse Date, Date, Thread, Author