Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #16628
| From | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: histexpand in shebang-less script |
| Date | 2020-07-27 15:22 -0400 |
| Organization | ITS, Case Western Reserve University |
| Message-ID | <mailman.151.1595877772.2739.bug-bash@gnu.org> (permalink) |
| References | <CAMu=Brp0zxz6R9pszEizu-3=HUpYOUOmXvs5h+9o3WcL1UGEDA@mail.gmail.com> <783121a0-8faf-79cb-ada0-ee10a9a11302@case.edu> |
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 chet@case.edu http://tiswww.cwru.edu/~chet/
Back to gnu.bash.bug | Previous | Next | Find similar
Re: histexpand in shebang-less script Chet Ramey <chet.ramey@case.edu> - 2020-07-27 15:22 -0400
csiph-web