| Re: [9fans] Local variables and rc functions |
|
 |
|
 |
|
 |
|
 |
Group: comp.os.plan9 · Group Profile
Author: kazumi iwanekazumi iwane Date: Aug 14, 2008 04:25
if you want to delay the expansion of an env var until fn invocation,,use eval.
%% fn foo {eval echo $$bar}
On 8/14/08, roger peppe gmail.com> wrote:
> looks like a bug to me; after all:
>
> %% bar=baz {echo $bar}
> baz
> %%
>
> i'm somewhat surprised this hasn't been fixed years ago.
>
> On Wed, Aug 13, 2008 at 10:27 PM, Micah Stetson stetsonnet.org>
> wrote:
>> Is this a bug?
>>
>> %% fn foo { echo $bar }
>> %% bar=baz foo
>>
>> %%
>>
>> I would expect to see baz instead of a blank line.
>>
>> Micah
|