From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18479 invoked from network); 25 Mar 2009 14:54:29 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 25 Mar 2009 14:54:29 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 52164 invoked from network); 25 Mar 2009 14:54:27 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 25 Mar 2009 14:54:27 -0000 Received: (qmail 22558 invoked by alias); 25 Mar 2009 14:54:23 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26785 Received: (qmail 22546 invoked from network); 25 Mar 2009 14:54:23 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 25 Mar 2009 14:54:23 -0000 Received: from cork.scru.org (cork.scru.org [209.20.67.2]) by bifrost.dotsrc.org (Postfix) with ESMTPS id 778D380590EB for ; Wed, 25 Mar 2009 15:54:20 +0100 (CET) Received: by cork.scru.org (Postfix, from userid 1000) id 38721104913; Wed, 25 Mar 2009 14:54:18 +0000 (UTC) Date: Wed, 25 Mar 2009 14:54:18 +0000 From: Clint Adams To: Vincent Lefevre , 517008@bugs.debian.org Cc: zsh-workers@sunsite.dk Subject: Re: Bug#517008: alias not expanded with zsh -c Message-ID: <20090325145418.GB9330@scru.org> Mail-Followup-To: Vincent Lefevre , 517008@bugs.debian.org, zsh-workers@sunsite.dk References: <20090225022850.GA4841@vin.lip.ens-lyon.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090225022850.GA4841@vin.lip.ens-lyon.fr> User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: ClamAV 0.92.1/9164/Wed Mar 25 05:02:31 2009 on bifrost X-Virus-Status: Clean On Wed, Feb 25, 2009 at 03:28:50AM +0100, Vincent Lefevre wrote: > Aliases are not expanded with the -c option, as shown below. > > vin% cmd=$(printf "emulate sh\nalias a='echo OK >&2'\na") > vin% printf "%s\n" "$cmd" > emulate sh > alias a='echo OK >&2' > a > vin% printf "%s" "$cmd" | zsh -f > OK > vin% zsh -fc "$cmd" > zsh:3: command not found: a > vin% > > There's no such problem with ksh93, bash in POSIX mode, and dash > (pdksh has the same bug). That does appear to be the behavior.