zsh-workers
 help / color / mirror / code / Atom feed
* why '_file -/' completes files if there is no directory?
@ 2013-07-25 14:09 Jun T.
  2013-08-08  6:56 ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Jun T. @ 2013-07-25 14:09 UTC (permalink / raw)
  To: zsh-workers

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.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-08-09 13:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-25 14:09 why '_file -/' completes files if there is no directory? Jun T.
2013-08-08  6:56 ` Bart Schaefer
2013-08-08 16:34   ` Jun T.
2013-08-09  5:59     ` Bart Schaefer
2013-08-09 13:27       ` Jun T.

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).