Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug#517008: alias not expanded with zsh -c
- X-seq: zsh-workers 26785
- From: Clint Adams <schizo@xxxxxxxxxx>
- To: Vincent Lefevre <vincent@xxxxxxxxxx>, 517008@xxxxxxxxxxxxxxx
- Subject: Re: Bug#517008: alias not expanded with zsh -c
- Date: Wed, 25 Mar 2009 14:54:18 +0000
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <20090225022850.GA4841@xxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: Vincent Lefevre <vincent@xxxxxxxxxx>, 517008@xxxxxxxxxxxxxxx, zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20090225022850.GA4841@xxxxxxxxxxxxxxxxxxx>
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author