Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Rationalized? aliases
- X-seq: zsh-workers 584
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: mdb@xxxxxxxxxxxx (Mark Borges)
- Subject: Re: Rationalized? aliases
- Date: Thu, 9 Nov 1995 12:13:57 +0100 (MET)
- In-reply-to: <9511090052.AA17663@xxxxxxxxxxxxxxxxxxxx> from "Mark Borges" at Nov 8, 95 05:52:22 pm
- Sender: hzoli@xxxxxxxxxx
Mark Borges wrote:
> An interesting idea, but it doesn't seem to do the same thing on my
> system:
>
> $ e="gnuclient -q"
> $ echo $=e
> gnuclient -q
> $ alias e="$=e -h $HOMESYSTEM"
> $ type e
> e is an alias for gnuclient
> $ alias e="gnuclient -h $HOMESYSTEM"
> $ type e
> e is an alias for 'gnuclient -h foo'
> $
>
> does it (HOMESYSTEM=foo here) ?
>
> Unless this is an hzoli-ism...
It is. I think if one writes $=e she wants to split something. So it is not
a bug but a feature.
Even `rc' expansion can be used:
% foo='a b c'
% echo "${^=foo}bar"
abar bbar cbar
But splitting is disabled when the result should be one word:
% bar="${^=foo}bar"
% echo $bar
a b cbar
Bye,
Zoltan
Messages sorted by:
Reverse Date,
Date,
Thread,
Author