bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: conditional aliases are broken


From: Sam Steingold
Subject: Re: conditional aliases are broken
Date: Mon, 15 Aug 2011 15:10:09 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> * Andreas Schwab <address@hidden> [2011-08-15 18:42:30 +0200]:
>
> Sam Steingold <address@hidden> writes:
>
>> this works:
>>
>> $ alias z='echo a'
>> $ zz(){ z b; }
>> $ zz
>> a b
>>
>> however, after sourcing this file:
>> if true; then
>>   alias z='echo a'
>>   zz(){ z b; }
>> fi
>
> Aliases are expanded during reading, but the alias command isn't
> executed until after the complete compound command was read.

Cool.  Now, what does this imply?
Is this the expected behavior aka "feature"?


-- 
Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 
11.0.60900031
http://mideasttruth.com http://palestinefacts.org http://truepeace.org
http://iris.org.il http://www.PetitionOnline.com/tap12009/
Apathy Club meeting this Friday.  If you want to come, you're not invited.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]