On 2019-06-10 08:38:52 -0700, enh wrote:
> but here's mksh:
> 
> ~$ mksh
> $ hello() { echo boing=$BOING; }
> $ BOING=123 hello
> boing=123
> $ echo $BOING
> 123
> $
> 
> and ksh, since that seems to come up on this list:
> 
> $ ksh
> ~ [1]$ hello() { echo boing=$BOING; }
> ~ [2]$ BOING=123 hello
> boing=123
> ~ [3]$ echo $BOING
> 123
> ~ [4]$
> 
> zsh also agrees. so it seems like bash is the exception (but bash is
> also the most useful?).

No, zsh doesn't agree:

zira% hello() { echo boing=$BOING; }
zira% BOING=123 hello
boing=123
zira% echo $BOING

zira% 

But with some builtins and some variables, these variables remain set.
Very ugly.

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Reply via email to