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

Re: Fun with zsh (Re: Associative array ordering (Re: Example function))



Bart Schaefer wrote:

> The manual says of GLOB_COMPLETE, "If no matches are found, a `*' is added
> to the end of the word or inserted at the cursor if tt(COMPLETE_IN_WORD)
> is set, and expansion is attempted again."  Now, (I*)* _IS_ a glob pattern,
> so this makes sense.
> 
> That also means that with globcomplete,
> 
> zsh% echo (I)<TAB>
> zsh% echo INSTALL
> 
> which in fact is what happens.  [[ INSTALL = (I) ]] is definitely false ...
> is globcomplete really using pattern matching the way you say?

Yes, but [[ INSTALL = (I)* ]] is true. I think we should just make
this clearer in the docs.

Bye
 Sven

--- od/Zsh/options.yo	Wed Feb  3 12:07:31 1999
+++ Doc/Zsh/options.yo	Fri Feb  5 08:44:22 1999
@@ -331,11 +340,12 @@
 pindex(GLOB_COMPLETE)
 item(tt(GLOB_COMPLETE))(
 When the current word has a glob pattern, do not insert all the words
-resulting from the expansion but cycle through them like
-tt(MENU_COMPLETE). If no matches are found, a `tt(*)' is added to the end of the
-word or inserted at the cursor if tt(COMPLETE_IN_WORD) is set, and expansion
-is attempted again.  Using patterns works not only for files but for all
-completions, such as options, user names, etc.
+resulting from the expansion but collect matches as for completion and
+cycle through them like tt(MENU_COMPLETE). If no matches are found, a
+`tt(*)' is added to the end of the word or inserted at the cursor if
+tt(COMPLETE_IN_WORD) is set, and completion is attempted again using
+pattern matching.  Since this doesn't use globbing, it not only for
+files but for all completions, such as options, user names, etc.
 )
 pindex(GLOB_DOTS)
 cindex(globbing, of . files)

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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