From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23285 invoked by alias); 1 Apr 2010 08:26:35 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27852 Received: (qmail 5690 invoked from network); 1 Apr 2010 08:26:32 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at spodhuis.org does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d200912; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=9aNjhymWQmeeddL0jd7YaajibKoPYwX3uw4xfUxNj7I=; b=WLYSHCYRsMrmXiQjUalRVZE3G3h5CrGrmjdHj8BqCva9pV08q13DKEtacVA39JN709jzoXDm3KKgoeGSL58VOW1utzPoRQg/vB80WQdhRo0B18SKmZ5MX+8SyJg/etxeGp9cK90PzTzHVSVxMLxFKW6Rq7dSM1fXu52Ocgvknfo=; Date: Thu, 1 Apr 2010 01:26:24 -0700 From: Phil Pennock To: Bart Schaefer Cc: zsh-workers@zsh.org Subject: Re: Is this a bug? Why not? Message-ID: <20100401082624.GA56998@redoubt.spodhuis.org> Mail-Followup-To: Bart Schaefer , zsh-workers@zsh.org References: <100330224612.ZM1818@torch.brasslantern.com> <20100331060602.GA91691@redoubt.spodhuis.org> <100331081153.ZM2688@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <100331081153.ZM2688@torch.brasslantern.com> On 2010-03-31 at 08:11 -0700, Bart Schaefer wrote: > Incidentally, this came up because of a discussion on the POSIX standards > mailing list (austin-group) in which David Korn just asserted that he'd > like to add the syntax ${"var"} which means to expand the value of var > as if it's quoted (what zsh's normal mode does all the time). > > This differs from "${var}" because you can write ${"var"-*} and get the > value of $var quoted but the glob pattern unquoted. Apparently the old > Bourne shell allows the abominable "${var"-*} (note quote placement > overlapping with brace placement) to accomplish this. > > I was hoping to be able to say "Oh, zsh already has syntax XYZ for that" > but in fact we don't -- zsh either always, or never, does it, depending > on the globsubst option; there's no way to flip globsubst on the fly. No *neat* syntax. % ls lib viewvc.conf % print -l ${~~foo-${(~):-*}} lib viewvc.conf % foo='???' $ print -l ${~~foo-${(~):-*}} ??? % print -l $foo lib % unsetopt glob_subst % print -l $foo ??? % *cough*