bug-bash
[Top][All Lists]
Advanced

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

Re: conditional aliases are broken


From: Linda Walsh
Subject: Re: conditional aliases are broken
Date: Wed, 17 Aug 2011 20:46:34 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Gecko/20100228 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666




` Eric Blake wrote:
On 08/15/2011 04:40 PM, Sam Steingold wrote:
* Andreas Schwab<address@hidden>  [2011-08-15 22:04:04 +0200]:
Sam Steingold<address@hidden>  writes:
Cool.  Now, what does this imply?
"For almost every purpose, shell functions are preferred over aliases."
so, how do I write
alias a=b
as a function?
(remember that arguments may contain spaces&c)

a() { b "$@"; }
---
Way too easy.
how do you declare a variable for storage in the context of the caller?
(using a function)...
???

The DebugPush & DebugPop routines I used needed to store
the current func's flags in it's context -- I found it very troublesome
inside a function, to store a value into a local variable in the caller.





reply via email to

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