Re: Fwd: BASH_ARGV0 do not inherit from environment variables

2019-01-08 Thread Chet Ramey
On 1/8/19 1:47 AM, Cuong Manh Le wrote: > Hi, > > I'm not sure this a feature or bug, but: > > $ BASH_ARGV0=foo /usr/local/stow/bash/bin/bash -c 'echo "$0"' > /usr/local/stow/bash/bin/bash > > I expect $0 set to foo instead. Thanks for the suggestion. BASH_ARGV0 comes in as a feature s

Fwd: BASH_ARGV0 do not inherit from environment variables

2019-01-07 Thread Cuong Manh Le
Hi, I'm not sure this a feature or bug, but: $ BASH_ARGV0=foo /usr/local/stow/bash/bin/bash -c 'echo "$0"' /usr/local/stow/bash/bin/bash I expect $0 set to foo instead. In zsh: $ ARGV0=foo zsh -c 'echo $0' foo Set BASH_ARGV0 after initialize the shell works as expected. Config