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

Re: Using buffer for history-incremental-search-backward



>} So is there anyway to history-incremental-search-backward (and
>} related commands to show a list of matching commands.  Sort of like
>} the w2k "F7" key in a cmd.exe window.)
>
>Not without interrupting the search.  But one could write a completion
>function that would do it; just search the $history hash:
>
>       compadd - "$history[(R)$BUFFER]"
>
>or something like that.

Maybe I'll play with that a little.  Though I was sort of under the
impression that the completion system could only complete a single word
at time, and not sets of words, like a previous command line would be.

I've sort of fancied the idea that zsh might have a completer for sets
of commandline args/flags at once.  For example, with the tar command it
would be possible to complete standard sets of flags that I use (e.g.
xzf, czf, xvf, etc.), which is possible since the flags are together as
a single word.  But what if I had a command that only has long options
that I wanted to complete all at once as a group ( for example for
GNU tar "--extract --gzip --file archive" , "--create --gzip --file
archive", etc.)  Can the completion system handle that?

Thanks very much, Bart, for your help with the h-i-s-b, it works just like I
want.

-JT.

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



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