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

Re: expanding the completed arguments (ie cvs add *)



On Mar 30,  2:43pm, xavier wrote:
} 
} I'd like to expand * with tab to the proposed completed possibilities
[...] 
} what did i do wrong ?

First of all, if you aren't using compsys (you probably are, but you
didn't say), the old expand-or-complete key binding for TAB expands
glob patterns as file names without regard to the completion context.

Secondly, if you are using compsys and you have the _expand completer
in your list of completers, that mimics the old style expansion and so
again you get all files globbed independent of context.

(This happens in part because the "completer" style is by necessity
looked up in the nearly-empty default context, because until the calls
to completers have begun the more specific context isn't yet known.)

In order to get the behavior you want, you need to be using compsys (and
therefore have TAB bound to complete-word rather than expand-or-complete)
and also NOT be using the _expand completer.

You might also want to look at the doc for the _all_matches completer.



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