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

Ignore patterns for alias



Hi,

I was trying to ignore some files during completion like this:

zstyle ':completion:*:*:vim:*:*files' ignored-patterns '*.pyc'

and could not get it to work. After a while i figured out that it's because I use scm-breeze which aliases vim so it accepts indexes:

$ which vim
vim: aliased to exec_scmb_expand_args /usr/bin/vim

I tried

zstyle ':completion:*:*:exec_scmb_expand_args:*:*files' ignored-patterns '*.pyc'

which ignores the files, but as there are others aliases for rm, mv, ... it is not specific enough. Something like:

zstyle ':completion:*:*:exec_scmb_expand_args:/usr/bin/vim:*files' ignored-patterns '*.pyc'

does not work at all.

Is this the expected behaviour? I expected completions to work on what is actually written on the command line and not on what it is aliased to. Is there a way to get it to work? Ideally so that this:

zstyle ':completion:*:*:vim:*:*files' ignored-patterns '*.pyc'

works out of the box?

Thanks!



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