From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6468 invoked from network); 17 Mar 1998 02:13:39 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 17 Mar 1998 02:13:39 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id UAA28209; Mon, 16 Mar 1998 20:50:51 -0500 (EST) Resent-Date: Mon, 16 Mar 1998 20:49:12 -0500 (EST) From: "Bart Schaefer" Message-Id: <980316174352.ZM3558@candle.brasslantern.com> Date: Mon, 16 Mar 1998 17:43:52 -0800 In-Reply-To: <980316161137.ZM28181@gizmo.aa.ans.net> Comments: In reply to "Eddy J. Gurney" "Glob'ing for a pattern that DOESN'T match..." (Mar 16, 4:11pm) References: <980316161137.ZM28181@gizmo.aa.ans.net> X-Mailer: Z-Mail (4.0b.820 20aug96) To: "Eddy J. Gurney" , zsh-users@math.gatech.edu Subject: Re: Glob'ing for a pattern that DOESN'T match... MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"UK9r42.0.wt6.NQT3r"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1392 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Mar 16, 4:11pm, Eddy J. Gurney wrote: } Subject: Glob'ing for a pattern that DOESN'T match... } } One of the biggest problems is that ZSHEXPN man page says that: } } ^x matches anything except the pattern x. } } Any ideas on what I might be doing wrong? Have you tried `setopt extendedglob` ? } I'm trying to write a `compctl' for `rm' so that `rm' will never complete } on various source files (.c, .h, .cc, .c++, etc.) and am having no luck } in getting it to work. This should get you started: setopt extendedglob compctl -g '^*.(c|h|cc|c++)' rm You might think that ^*.{c,h,cc,c++} should work, but brace expansion is not part of globbing (something I find extremely counter-intuitive); so that's actually shorthand for the four patterns ^*.c ^*.h ^*.cc ^*.c++, each of which includes everything excluded by the others (and you end up right back where you started). -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com