From: Philippe Troin <phil@fifi.org>
To: zsh-workers@sunsite.dk
Subject: More fun with completion: glob qualifiers ignored for ignored-patterns style?
Date: 14 Jul 2003 13:33:57 -0700 [thread overview]
Message-ID: <87n0fg3l1m.fsf@ceramic.fifi.org> (raw)
% 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.
next reply other threads:[~2003-07-14 20:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-14 20:33 Philippe Troin [this message]
2003-07-14 21:39 ` Bart Schaefer
2003-07-15 1:57 ` Philippe Troin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87n0fg3l1m.fsf@ceramic.fifi.org \
--to=phil@fifi.org \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).