Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
why '_file -/' completes files if there is no directory?
- X-seq: zsh-workers 31577
- From: "Jun T." <takimoto-j@xxxxxxxxxxxxxxxxx>
- To: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: why '_file -/' completes files if there is no directory?
- Date: Thu, 25 Jul 2013 23:09:12 +0900
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
With the following style:
zstyle ':completion:*:warnings' format 'No match for: %d
If there is no subdirectory in the current directory,
zsh$ cd <TAB>
gives
No match for: `local directory'
but
zsh$ rmdir <TAB>
completes the normal files in the current directory.
Similar behavior for 'gcc -I<TAB>' etc.
Not a serious problem, but I prefer getting a warning than being
offered a useless list of normal files.
Are there any way to stop this behavior by using zstyle?
Obviously I can't use
zstyle ':completion:*' file-patterns '*(-/)'
so I tried
zstyle ':completion:*:directories' file-patterns '*(-/)'
but it didn't' work (it seems setting file-patterns for a specific
tag has no meaning). Setting file-patterns (or tag-order?) to each
context ':completion:*:gcc:option-I-1:*' etc. may work, but I don't
want to do that even if it works.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author