From mboxrd@z Thu Jan 1 00:00:00 1970 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes Date: Thu, 4 Feb 1999 09:06:09 +0100 (MET) Message-Id: <199902040806.JAA14145@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Bart Schaefer"'s message of Wed, 3 Feb 1999 09:38:06 -0800 Subject: Re: Fun with zsh (Re: Associative array ordering (Re: Example function)) X-Mailing-List: 5225 Bart Schaefer wrote: > On Feb 3, 4:00pm, Sven Wischnowsky wrote: > } Subject: Re: Fun with zsh (Re: Associative array ordering (Re: Example fun > } > } Bart Schaefer wrote: > } > } > Following application of your patch, using 3.1.5-pws-6 zsh -f, > } > > } > zsh% foo=('(I*) > } > > } > only feeps > } > } Whew. The first behavior is the correct one, since the completion code > } should take the `(I*)' as the prefix of the string to complete and as > } long as you don't have a file with a name starting with this, nothing > } should be matched. > > But I *DO* have a file beginning with "I" -- $PWD is the zsh source root, > so the INSTALL file is there. (I*) apparently isn't a glob pattern: > > zagzig% echo (I*) > zsh: no matches found: (I*) > zagzig% echo (I*|) > INSTALL > > So if your patch somehow makes (I*) complete, something weird is going on. Something weird indeed: me again, forgetting to mention the option globcomplete. *Only* if that option is set, (I*) will complete to INSTALL. Now one may argue that (I*) isn't a glob pattern so an option named *glob*complete shouldn't make this happen. But the name of the option has historical reasons, the option uses pattern matching (not globbing) to match possible completions, and indeed: [[ INSTALL = (I*) ]] && echo yep, indeed Ok? Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de