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

Path completion causing ambiguous path tail to disappear



This is not exactly a complaint, because I can (almost) get the behavior I
want by using a style ... rather it's a question of whether the default
behavior should be different.

I have my zsh sources under /usr/src/local/zsh/.  With dev-19:

zagzig[36] cd /usr/s/l/<TAB>

The valid completions at this point should be

/usr/src/local	/usr/src/linux /usr/share/libtool /usr/share/locale

However, what happens is that the word on the command line is *shortened*,
leaving me with

zagzig[36] cd /usr/s/

with the cursor on top of the final `/'.  Now, I don't mind the cursor
moving back to that point if that's where I need to disambiguate, but I
was surprised that zsh deleted the tail of the path rather than simply
feeping, or displaying the list.

Note that if I start with no trailing slash, i.e.

zagzig[36] cd /usr/s/l<TAB>

*then* the behavior is what I expect; the cursor moves back to the `/'
but the `l' remains on the line.

If I use

	zstyle ':completion:*:paths' expand prefix

Then I get the behavior I want from expand-or-complete, but not from
complete-word (which causes predict-on to break, which is how I really
noticed all of this in the first place).

Why does the trailing slash cause the `l/' to be deleted?

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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