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

Completion and menu behavior



Being an avid ZSH user I've recently spent some time learning the new completion system. Very powerful stuff! After adding zstyle entries in my .zshrc I tried to get the tab (complete-word) behavior to behave in a manner as follows:

lets say I'm in a directory that contains only files 'foobar' and 'foofoo' and I type 'less [TAB]' at the command line. Currently I will get a partial completion of 'foo' and that's it. Now what I would like is that if I were to type 'less [TAB]' at the command line I would be given 'less foo' with the cursor following just after the partial completion, but *also* with a menu listing foobar and foofoo. Now I have tried all combinations of completion options and styles to try and get this behavior, but none do the trick. The one I believe should do the trick is AUTO_LIST since it's documentation indicates that it will always display a menu list with an ambiguity. But I think that the problem is that a partial completion is not considered an ambiguity. AUTO_LIST does work in the case that if I type 'less foo[TAB]' then the menu does appear since no completion at all is taking place. I don't want to use something like MENU_COMPLETE because a like the partial completions.

I may sound lazy since in the above case I could type TAB twice, once to get a partial completion then again to get the menu. However, with this behavior one cannot tell on the first TAB hit if the completion of 'foo' is a partial completion or a full completion. What I would like is for the menu list to act as an indicator of a partial completion in addition to displaying the possible matches.

I'm using zsh (4.0.4)
Any help would be appreciated!

Byron







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