From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4675 invoked from network); 18 Aug 2003 06:04:38 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 18 Aug 2003 06:04:38 -0000 Received: (qmail 12928 invoked by alias); 18 Aug 2003 06:04:18 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6472 Received: (qmail 12917 invoked from network); 18 Aug 2003 06:04:18 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 18 Aug 2003 06:04:18 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [204.127.198.35] by sunsite.dk (MessageWall 1.0.8) with SMTP; 18 Aug 2003 6:4:15 -0000 Received: from bobo.thehutt.org ([68.49.245.189]) by comcast.net (rwcrmhc11) with ESMTP id <2003081806040901300ontese>; Mon, 18 Aug 2003 06:04:09 +0000 Received: from bebop.thehutt.org (bebop.thehutt.org [10.0.1.48]) by bobo.thehutt.org (8.12.7/8.12.7/SuSE Linux 0.6) with ESMTP id h7I62weT013757 for ; Mon, 18 Aug 2003 02:02:58 -0400 Received: from bebop.thehutt.org (localhost [127.0.0.1]) by bebop.thehutt.org (8.12.7/8.12.7/SuSE Linux 0.6) with ESMTP id h7I62vYk015989 for ; Mon, 18 Aug 2003 02:02:57 -0400 Received: (from jerry@localhost) by bebop.thehutt.org (8.12.7/8.12.7/Submit) id h7I62vPg015988 for zsh-users@sunsite.dk; Mon, 18 Aug 2003 02:02:57 -0400 X-Authentication-Warning: bebop.thehutt.org: jerry set sender to jerry@thehutt.org using -f Date: Mon, 18 Aug 2003 02:02:57 -0400 From: Jerry A! To: zsh-users@sunsite.dk Subject: Re: Help w/compctl & ksh_glob Message-ID: <20030818060257.GA15930@bebop.thehutt.org> References: <20030816065935.GA31520@bebop.thehutt.org> <1030816170739.ZM5619@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1030816170739.ZM5619@candle.brasslantern.com> User-Agent: Mutt/1.4i Organization: Broken Toys Unlimited On Sat, Aug 16, 2003 at 05:07:39PM +0000, Bart Schaefer wrote: : On Aug 16, 2:59am, Jerry A! wrote: : } Subject: Help w/compctl & ksh_glob : } : } I'm trying to setup some simple completions under zsh 4.0.6 using : } 'compctl' and 'emulate ksh'. : : Any particular reason you're not using compinit? Yeah, I think that compinit is overkill for simple file extension completion. : } compctl -/g '*.+(b{oo,ar,az}|quu|txt)' foo : ^^^^^^^^^^ : The documentation for 'compctl -g' may have part of the answer: : : [...] More than one pattern may be : given separated by blanks. (Note that brace expansion is _not_ : part of globbing. Use the syntax `(either|or)' to match : alternatives.) : : (Of course you need +(oo|ar|az) with KSH_GLOB set.) : : However, the real problem is something to do with the SH_GLOB option, : which is set by 'emulate ksh'. If I 'unsetopt SH_GLOB' then even as : (incorrectly) written your compctl offers me directories and .txt files. Actually, {} globbing is valid ksh93 syntax. It's not valid ksh88 syntax. But I've always pictured zsh's ksh emulation as ksh93 emulation. : This SH_GLOB problem doesn't affect globbing outside of compctl as far : as I can tell. This got the wheel's turning. Turn's out that 'emulate ksh' turns on 'SH_GLOB', which in turns disables (|) globbing. Boo, not the expected behavior since ksh expects these characters to enumerate shell globbing. Turning off SH_GLOB makes everything work correctly. Thanks for giving me a path to track down. --Jerry -- Open-Source software isn't a matter of life or death... ...It's much more important than that!