Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug Report: Env Vars and shell functions



There's still a bug here; with 3.0-pre2 and only Peter's patch from
article 1573 and Zoltan's fix from article 1596, here's what happens:

: zsh-3.0-pre2/Solaris Wed 10 8:08; env - /pd/osbin/zsh -f
spacely% echo $ZSH_VERSION
3.0-pre2
spacely% function foo {
> echo "Function foo; FOO = $FOO"
> ./x
> }
spacely% cat ./x
#!/pd/osbin/zsh -f
 
print "This is $0; FOO = $FOO"
spacely% foo
Function foo; FOO = 
This is ./x; FOO = 
spacely% FOO=BAR foo
Function foo; FOO = BAR
This is ./x; FOO = BAR

# Okay so far, but...

spacely% foo
Function foo; FOO = 
This is ./x; FOO = BAR

FOO should be unset during the last running of ./x.

--vin





Messages sorted by: Reverse Date, Date, Thread, Author