Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
aliases in zsh -c and eval
- X-seq: zsh-workers 33810
- From: Stephane Chazelas <stephane.chazelas@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: aliases in zsh -c and eval
- Date: Thu, 27 Nov 2014 21:22:22 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mail-followup-to:mime-version :content-type:content-disposition:user-agent; bh=8JutP2VSiC2xJWVG5jhzIea4WwazOoTQ5aOpUJ+dNME=; b=JbGSoTPRU2GeyARCq0ixBySIWrOZ+B2y5kH2USInizf8CuQOjMjLvJEADkUh76xFGa 8bvB/R0QIDtWpPISFesyW5o6A6yXOTMMeqFOzgj+JI7J6zIkPdVYF+PLQXZ4c+DqVreX OXlLVDEe6/9v8H7n6j9OAMX3dX40J+tHp2NNkJJVRBKs7hrZVa6oUos5txLnYzUN8zEE r7SbbSDlV12tpAFOFEbnOUi27+NqeXPxyOWY5myDrGzUa0XY+oXb4fC15OgzZYtz3hqp RYN4BiT5N6VDPGXMxDbkyW1SsIDKd2fdudjU9FJ43cGxS+A8wJIOj4H0RDdd8LIHSSaK H3yA==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mail-followup-to: Zsh hackers list <zsh-workers@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hiya,
it looks like aliases defined in `zsh -c` are not expanded in
there:
$ zsh -c 'alias foo=echo
foo bar'
zsh:2: command not found: foo
Those defined for instance in ~/.zshenv are expanded. And:
$ zsh -c 'alias foo=echo
eval foo bar'
bar
It looks like zsh is the only one out here. (with bash you need
bash -O expand_aliases).
Same with eval:
$ (eval 'alias foo=echo
subsh quote> foo bar')
zsh: command not found: foo
$ (eval 'alias foo=echo
eval foo bar')
bar
This time, ksh93 does behave like zsh.
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author