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

Re: expand style `suffix' option



On Oct 2, 12:41pm, Peter Stephenson wrote:
}
}   zstyle ':completion:*' expand prefix suffix
} 
} When it does seem to be on, I would expect
}   ~/b/b<TAB>
} to list or cycle through all files ~/b*/b* when menu completion is in use,
} but it doesn't.  Is this assumption wrong?

I get the exact same behavior out of that no matter what `expand' is set
to.  E.g. I happen to have two files

	~/netmanage/record
	~/newmail/record

but no matter what the setting of the expand style, I always get:

schaefer<512> ls ~/n/r<TAB>
schaefer<512> ls ~/ne/r

(with cursor on the second `/').  Using menucomplete instead of automenu,
I get the menu:

schaefer<514> ls ~/n/r<TAB>
schaefer<515> ls ~/netmanage/r
Completing files
netmanage/  newmail/  

but once again the `expand' style has no effect on this.

It looks like _path_files applies the `expand prefix' style only if the
number of matches generated is the same as the number that existed at
the time _path_files was called (line 655, nm -eq compstate[nmatches]).
But that never seems to be true.

Also, _path_files only checks that `expand suffix' is NOT set, and then
as part of a larger test to decide whether to clear compstate[to_end]
(lines 508-515), and I can't figure out what circumstances cause all the
other ||'d conditions to be false so that `expand suffix' will matter.

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