zsh-users
 help / color / mirror / code / Atom feed
* expanding the completed arguments (ie cvs add *)
@ 2004-03-30 19:43 xavier
  2004-03-31 16:42 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: xavier @ 2004-03-30 19:43 UTC (permalink / raw)
  To: Zsh User ML

Hi, 

I'd like to expand * with tab to the proposed completed possibilities

ie in a directory  with 

CVS
test1 
test2

cvs add <tab> will prompt test1 and not test2 if test2 is already in cvs.

however, if i do cvs add *<tab>, this complete to CVS test1 test2....
what did i do wrong ?

thanks


-- 
xavier


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: expanding the completed arguments (ie cvs add *)
  2004-03-30 19:43 expanding the completed arguments (ie cvs add *) xavier
@ 2004-03-31 16:42 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2004-03-31 16:42 UTC (permalink / raw)
  To: Zsh User ML

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-03-31 16:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-30 19:43 expanding the completed arguments (ie cvs add *) xavier
2004-03-31 16:42 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).