From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3) with ESMTP id FAA03260 for ; Thu, 23 May 1996 05:42:07 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id PAA26432; Wed, 22 May 1996 15:26:21 -0400 (EDT) Resent-Date: Wed, 22 May 1996 15:26:21 -0400 (EDT) From: Zoltan Hidvegi Message-Id: <199605221926.VAA30731@bolyai.cs.elte.hu> Subject: Re: Programmable completion bug in beta18 To: schaefer@z-code.ncd.com Date: Wed, 22 May 1996 21:26:20 +0200 (MET DST) Cc: zsh-workers@math.gatech.edu In-Reply-To: <960522114756.ZM12275@zyrcon.z-code.com> from "Barton E. Schaefer" at "May 22, 96 11:47:55 am" Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368 X-Mailer: ELM [version 2.4ME+ PL16 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"JDC982.0.wS6.Sfsen"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1129 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > On May 22, 8:08pm, Zoltan Hidvegi wrote: > } Subject: Re: Programmable completion bug in beta18 > } > } > compctl -g '*(D-/)' cd > } > {jagor}[0][~/hrv/zsh-2.6-beta18]$ cd [^D] > } > > } > ^D gives no output. TAB refuses to menu-complete. Shortly, it doesn't work. > } > } You need to set extended_glob for that. > > For what, specifically? > > } I think that extended_glob should be set by default when zsh is not called > } as sh or ksh. > > There's a whole lot of extendedglob stuff that I don't normally want, so > up through 2.5* I've not had it set. Under what circumstances is it now > required where it was not required before? In case of compctl, the pattern is stored as a string, and tokenize() is called to tokenize it, the same function which is used for GLOB_SUBST. My previous example was not really correct. The problem is that: % foo='*(/)' % echo $foo If zsh is called as sh this should print the files ending in (/) instead of the directories. echo *(D-/) is syntactically incorrect under sh and it still works in zsh without extended_glob. Everything is affected which uses tokenize() internally. E.g. the builtin command arguments after -m only know *, ? and [...]. Elternatives does not work line (foo|bar)*. Maybe some more fine-grained control of glob behaviour is preferable. With sh (, | and ) are ordinary characters in glob patterns. Maybe we can keep the original zsh behaviour and add a new option something like SH_GLOB wich does not handle (, | and ) specially. Zoltan