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

Re: Is this possible -- menu completion for pattern



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.
>
> Is this possible?

I have the following in my ~/.zshrc:

    # Completion customizations, adding nice menus, descriptions, etc
    zstyle -e ':completion:*:approximate:*' max-errors 'reply=( $(( ($#PREFIX + $#SUFFIX) / 3 )) )'
    zstyle ':completion:*:descriptions' format "- %d -"
    zstyle ':completion:*:corrections' format "- %d - (errors %e})"
    zstyle ':completion:*:default' list-prompt '%S%M matches%s'
    zstyle ':completion:*' group-name ''
    zstyle ':completion:*:manuals' separate-sections true
    zstyle ':completion:*' menu select
    zstyle ':completion:*' verbose yes

I believe I borrowed most of that from the GRML zshrc, which is a
nice read, too.

-- 

[Will Maier]-----------------[willmaier@xxxxxxx|http://www.lfod.us/]



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