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

Re: zsh 4.x bug in completion?

I get very strange behavior from 4.0.2.


zstyle ':completion:*' completer _complete _prefix  

I get:

schaefer<503> <Ctrl-P>
schaefer<503> echo foo<Ctrl-A>
schaefer<503> sud<TAB>echo foo
schaefer<503> sudoecho  foo
		       cursor here

That is, it inserts `sudo' with no trailing space, but then moves to
the end of the word `echo' and adds a space *there*.  That is almost
certainly wrong?

I get exactly the same thing from 4.1.0-dev-2.

If I then add

zstyle ':completion:*' add-space yes

I get `sudo echo  foo', that is, it has added a space both after `sudo'
and after `echo'.

And, by the way, with TAB bound to expand-or-complete-prefix, I can in
fact reproduce the original complaint.  Auto-removing the space may make
sense when completing in the middle of a file path, but it doesn't when
completing in command position.

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