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 From: "Bart Schaefer" Message-Id: <990204081107.ZM16884@candle.brasslantern.com> Date: Thu, 4 Feb 1999 08:11:07 -0800 In-Reply-To: <199902040806.JAA14145@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "Re: Fun with zsh (Re: Associative array ordering (Re: Example function))" (Feb 4, 9:06am) References: <199902040806.JAA14145@beta.informatik.hu-berlin.de> X-Mailer: Z-Mail (4.0b.820 20aug96) To: zsh-workers@sunsite.auc.dk Subject: Re: Fun with zsh (Re: Associative array ordering (Re: Example function)) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailing-List: 5242 On Feb 4, 9:06am, Sven Wischnowsky wrote: } Subject: Re: Fun with zsh (Re: Associative array ordering (Re: Example fun } } } Bart Schaefer wrote: } } > 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 That's interesting. 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) zsh% echo INSTALL which in fact is what happens. [[ INSTALL = (I) ]] is definitely false ... is globcomplete really using pattern matching the way you say? -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com