From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15055 invoked from network); 7 Oct 1998 16:55:28 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 7 Oct 1998 16:55:28 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id MAA18428; Wed, 7 Oct 1998 12:44:28 -0400 (EDT) Resent-Date: Wed, 7 Oct 1998 12:44:17 -0400 (EDT) From: "Bart Schaefer" Message-Id: <981007094733.ZM14156@candle.brasslantern.com> Date: Wed, 7 Oct 1998 09:47:33 -0700 In-Reply-To: <9810071511.AA34477@ibmth.df.unipi.it> Comments: In reply to Peter Stephenson "Re: Null tilde expansions?" (Oct 7, 5:11pm) References: <9810071511.AA34477@ibmth.df.unipi.it> <981006205428.ZM10148@candle.brasslantern.com> <981007082641.ZM12497@candle.brasslantern.com> In-Reply-To: Comments: In reply to Greg Badros "Re: Null tilde expansions?" (Oct 7, 8:41am) X-Mailer: Z-Mail (4.0b.820 20aug96) To: Greg Badros , zsh-users@math.gatech.edu Subject: Re: Null tilde expansions? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"64uz.0.EV4.Wfv6s"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1842 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 Oct 7, 5:11pm, Peter Stephenson wrote: } Subject: Re: Null tilde expansions? } } I think the appropriate option is 'nomatch'. (Sounds OK to me, it's a } match that's failing rather than a pattern that's been typed wrongly.) I first tried it with just no_nomatch, and got an error. However, now that I fool with it again, I must have mistyped something else, because it is indeed only no_nomatch that's required. On Oct 7, 8:41am, Greg Badros wrote: } Subject: Re: Null tilde expansions? } } > dirs=(${(M)dirs:#~) } } Besides the obvious typo of a closing paren for a closing brace, there } are three problems: } } 1) I want the (R)est, not the match, right? } 2) The ~ needs to be escaped, otherwise it'll get expanded. } 3) The pattern after the # needs to match the whole word, so it needs a } trailing *. Bleah. This is what I get for testing stuff on a machine where the only home directory is my own, so the expansion of the only valid username "accidentally" matches the expansion of ~. Yes, you're right. Or just ${dirs##~*}, in which the ~ is not expanded in the first place. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com