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

RE: file-patterns problem



>
> First of all: if one wants to set a file-pattern explicitly one should
> use the tag one wants to set it for. Otherwise it will always be used,
> for all possible tags.
>
> Second: one only gets the extra (i.e. normally not tried) tags one
> explicitly selects. So:
>
>   zstyle ':completion:*:*:foo:*:globbed-files' file-patterns '*.yo'
>
> Makes only the globbed-files and the all-files tags be used. If one
> wants directories, one has to say that:
>
>   zstyle ':completion:*:*:foo:*:directories' file-patterns '*(-/)'
>
> This is a bit ugly. I /think/ I asked if we should make this different
> when I added the file-patterns style, but it may well be that I
> forgot. So: should we make the directories tag with its usual pattern
> be tried automatically if the user explicitly sets the file-patterns
> tag for globbed-files? Or should we do that only if the directories tag,
> file-patterns style is given, but allow an empty value to stand for
> `the normal pattern'?
>

In other words - setting styles for partucular tag has a side effect of
enabling this tag? I find it really confusing. Do not we have special tag to
enable/disable tags (ough :-) Hmm looks, like not. The closest is
tag-order - and if it gets slightly different name (without so much strngth
on ``order'') - it is quite usable to say, which tags and in which order.

In the case above - files and path_files should have default tags to try and
with default patterns. If you do not want to see all files - set tag-order
to the correct tags. If you wnat other patterns - set file-patterbs. If you
want only particular tags with particular patterns - set both.

/andrej



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