> Both fixes are in plan9port.
Thanks, Russ.
Micah
> Is this a bug?
>
> % fn foo { echo $bar }
> % bar=baz foo
>
> %
>
> I would expect to see baz instead of a blank line.
Yes, it is a bug. The fix is:
diff -r f7e7b9ab4cfb src/cmd/rc/simple.c
--- a/src/cmd/rc/simple.c Sun Jul 20 06:17:17 2008 -0400
+++ b/src/cmd/rc/simple.c Thu Au
i apologize for the noise. i should have tested befoqe posting.
rog, thank you for correcting me.
On 8/14/08, roger peppe <[EMAIL PROTECTED]> wrote:
> On Thu, Aug 14, 2008 at 12:20 PM, kazumi iwane <[EMAIL PROTECTED]> wrote:
>> if you want to delay the expansion of an env var until fn invocation,,
On Thu, Aug 14, 2008 at 12:20 PM, kazumi iwane <[EMAIL PROTECTED]> wrote:
> if you want to delay the expansion of an env var until fn invocation,,use
> eval.
>
> % fn foo {eval echo $$bar}
sorry, but that's so, so wrong.
1) $$bar gives the value of the variable
named by the contents of the vari
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 <[EMAIL PROTECTED]> 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.
>
> O
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 <[EMAIL PROTECTED]> wrote:
> Is this a bug?
>
> % fn foo { echo $bar }
> % bar=baz foo
>
> %
>
> I would expect to see baz inste
Is this a bug?
% fn foo { echo $bar }
% bar=baz foo
%
I would expect to see baz instead of a blank line.
Micah