Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Is this possible -- menu completion for pattern
- X-seq: zsh-users 11101
- From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Is this possible -- menu completion for pattern
- Date: Sat, 06 Jan 2007 01:36:47 +0100
- In-reply-to: <20070105235947.GI28113@xxxxxxxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Operating-system: Linux 2.6.18.3suspend2+ipw2200 i686
- References: <6a42eec70701051517q51b1bf4dw2248a9d372f6650e@xxxxxxxxxxxxxx> <20070105235947.GI28113@xxxxxxxxxxxx>
Will Maier <willmaier@xxxxxxx>:
> On Fri, Jan 05, 2007 at 03:17:28PM -0800, sam reckoner wrote:
> > What I want is to do
> >
> > % vi *.txt
> >
> > then press TAB and then see a menu I can navigate with the cursor
> > keys of the *.txt files in the current directory.
>
> I have the following in my ~/.zshrc:
[...]
> I believe I borrowed most of that from the GRML zshrc, which is a
> nice read, too.
I'm afraid that is not what the OP asked for. What he is asking for
is this: vi *.txt<TAB> ...and then be dropped into a menu selection.
To do that at least this is needed:
[snip]
zmodload zsh/complist
autoload -U compinit && compinit
bindkey '^I' complete-word
zstyle ':completion:*' completer _expand _complete
zstyle ':completion:*' menu select yes
[snap]
That is the minimum. To further tweak the completion system there are
various documents that may help. I think a good starting point to
start learning-by-doing the completion system is the wiki¹, that holds
lots of examples² on how to customize compsys and how to get started
in the first place³ (if you don't use the compinstall function).
Regards, Frank
¹ <http://zshwiki.org>
² <http://zshwiki.org/home/#examples>
³ <http://zshwiki.org/home/examples/compquickstart>
--
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
-- RFC 1925
Messages sorted by:
Reverse Date,
Date,
Thread,
Author