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

Re: How to change order of completions?





On Wednesday, April 3, 2013 3:35:45 PM, Bart Schaefer wrote:
On Apr 3,  2:39pm, reckoner wrote:

   >  zstyle ':completion:*:vi(|m):*' file-patterns \
   >      '*.tex:tex-files' '*.(c|cpp|c++|h|py):src-files' '*:all-files'

This works great except when I have

% vi () { gvim $* }

as a user-defined function.

Works for me.  Do you perhaps also have an alias for "vi"?  What do you
get from

% vi <ctl-x>h

??

I just set up a test (513 is me pressing ctl-x h):

----------
schaefer<511> which vi
vi () {
         print $*
}
schaefer<512> zstyle -L | grep file-patterns
zstyle ':completion:*:vi(|m):*' file-patterns '*.tex:tex-files' '*.(c|cpp|c++|h):src-files' '*:all-files'
schaefer<513> vi
tags in context :completion::complete:vi::
     tex-files  (_files _default (eval))
     src-files  (_files _default (eval))
     all-files  (_files _default (eval))
----------


% vi<TAB>

I presume you mean for there to be a space between vi and <TAB>.

Yes. You are right! I had a stray alias.

Thanks again!



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