On 7/24/20 7:44 PM, Grisha Levit wrote:
> The value of `histexpand' is not reset when executing a shebang-less
> script. (Admittedly, this is unlikely to matter since the value of
> `history' *is* properly reset.)
> 
> $ cat > /tmp/test1.sh <<"EOF"
> #!/usr/bin/env bash
> echo $-
> EOF
> $ cat > /tmp/test2.sh <<"EOF"
> echo $-
> EOF
> $ chmod +x /tmp/test1.sh /tmp/test2.sh
> $ set -H
> $ /tmp/test1.sh
> hB
> $ /tmp/test2.sh
> hBH
> 
> Since reset_shell_flags is only called in this circumstance, it seems
> that turning off history expansion should be the right thing to do in
> that function.

Thanks for the report and fix.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Reply via email to