zsh-workers
 help / color / mirror / code / Atom feed
* More fun with completion: glob qualifiers ignored for ignored-patterns style?
@ 2003-07-14 20:33 Philippe Troin
  2003-07-14 21:39 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Philippe Troin @ 2003-07-14 20:33 UTC (permalink / raw)
  To: zsh-workers

% 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.


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

end of thread, other threads:[~2003-07-15  1:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-14 20:33 More fun with completion: glob qualifiers ignored for ignored-patterns style? Philippe Troin
2003-07-14 21:39 ` Bart Schaefer
2003-07-15  1:57   ` Philippe Troin

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).