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

Re: Expansions with glob_complete ignore no_case_glob



Christian Taylor wrote:
> The thing that suprised me originally is that for
> instance wildcards apparently cause the pattern to be completed by a
> mechanism that both ignores NO_CASE_GLOB and the matcher-list
> configuration
> [when glob_complete is set].

Yes, it looks like you're correct.  It seems that the completion code
decides if there are pattern characters present and if there aren't it
handles matching internally, so that it works.  Otherwise it passes the
whole thing to the pattern matcher.  (I haven't traced this through but
something like this must be happening.)

Hmm, I think this is quite tricky.  The pattern matcher doesn't know
about the matcher list and training it would be tricky.  Getting the
completion code to fix up fixed string parts of the completion is also
tricky.  So this probably needs documenting as a limitation for now.

Index: Doc/Zsh/options.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/options.yo,v
retrieving revision 1.35
diff -u -r1.35 options.yo
--- Doc/Zsh/options.yo	3 Sep 2004 09:47:48 -0000	1.35
+++ Doc/Zsh/options.yo	12 Jan 2005 13:05:41 -0000
@@ -215,6 +215,11 @@
 tt(COMPLETE_IN_WORD) is set.  This actually uses pattern matching, not
 globbing, so it works not only for files but for any completion, such as
 options, user names, etc.
+
+Note that when the pattern matcher is used, matching control (for example,
+case-insensitive or anchored matching) cannot be used.  This limitation
+only applies when the current word contains a pattern; simply turning
+on the tt(GLOB_COMPLETE) option does not have this effect.
 )
 pindex(HASH_LIST_ALL)
 item(tt(HASH_LIST_ALL) <D>)(

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



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