Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
More fun with completion: glob qualifiers ignored for ignored-patterns style?
- X-seq: zsh-workers 18853
- From: Philippe Troin <phil@xxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: More fun with completion: glob qualifiers ignored for ignored-patterns style?
- Date: 14 Jul 2003 13:33:57 -0700
- Mail-copies-to: nobody
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Sender: Philippe Troin <phil@xxxxxxxx>
% echo $ZSH_VERSION
4.0.7
% ls
% touch file
% mkdir dir
% ls
dir/ file
% zstyle ':completion:*:all-files' ignored-patterns '*(/)'
% ls <TAB>
>>> Completing files...
dir/ file
"dir" should not have been a completion candidate...
% zstyle ':completion:*:all-files' ignored-patterns '*(e:''[[ -d $REPLY ]]'')'
% ls <TAB>
>>> Completing files...
dir/ file
Nor here (note: I use setopt rcquotes).
% zstyle ':completion:*:all-files' ignored-patterns '(#b)file(#e)'
% ls <TAB>
% ls dir/
Is that because bare_glob_qual is unset when expanding the pattern?
By the way, the manual says about glob qualifiers:
Patterns used for filename generation may end in a list of qualifiers
enclosed in parentheses. The qualifiers specify which filenames that
otherwise match the given pattern will be inserted in the argument list.
If the option BARE_GLOB_QUAL is set, then a trailing set of parentheses
containing no `|' or `(' characters (or `~' if it is special) is taken
as a set of glob qualifiers. A glob subexpression that would normally
be taken as glob qualifiers, for example `(^x)', can be forced to be
treated as part of the glob pattern by doubling the parentheses, in
this case producing `((^x))'.
Does that mean that:
- if BARE_GLOB_QUAL is set, glob qualifiers are enabled
- if BARE_GLOB_QUAL is unset, glob qualifiers are disabled?
The behavior of zsh when BARE_GLOB_QUAL is unset is very unclear from
the above description, at least for me...
Phil.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author