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

Re: completion with globbing, take 2

On Sep 18,  6:07pm, E. Jay Berkenbilt wrote:
} Subject: Re: completion with globbing, take 2
} >   Does it?  What happens when you complete a pattern that matches only
} >   directories?
} Well, in fact, I never do this with rmdir. [...]
} I really use this with cvs add and cvs rm where it is great.

So you have it restricted by style to :completion::complete:cvs* or
something like that?  I could see where that would be useful, but I
wouldn't want it in context :completion:* ...

I generally do the same thing by using accept-and-menu-complete.  Just
hit tab once, get the first completion, and then hit ^X TAB until all
the files have appeared.  That way I can selectively skip any that I don't
want to add, rather than inserting them all and then having to back up
and delete some.

    bindkey '^X^I' accept-and-menu-complete

} Nice to know.  So I guess zsh functions are like lisp and perl -- the
} value of the last statement is the return value -- but with the
} additional feature that return with no arguments returns the last
} value....

That's true of all Bourne-shell-like shells, actually.  At least, those
that have functions.

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