Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #16614
| From | Oğuz <oguzismailuysal@gmail.com> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: $SHELLOPTS after function with `local -' |
| Date | 2020-07-24 11:21 +0300 |
| Message-ID | <mailman.454.1595578886.24492.bug-bash@gnu.org> (permalink) |
| References | <CAMu=BrqQwOGPL09TJcPJXcugwHeDeeHCtmxyuS=faLJZLymCrw@mail.gmail.com> <CAH7i3LqQYjf+-vRnW+AZACBzgyuV_AwnE_-CLA1d+dg6-t3uCA@mail.gmail.com> |
24 Temmuz 2020 Cuma tarihinde Grisha Levit <grishalevit@gmail.com> yazdı:
> The value of $SHELLOPTS is not always updated correctly after returning
> from a function that modifies options after using `local -'.
>
>
What version of bash is this? I can't reproduce the bug on 5.0.11.
> For example:
>
> fun() { local -; set -u; }; fun
> [[ $- == *u* ]]; echo $? # 1
> [[ :$SHELLOPTS: == *:nounset:* ]]; echo $? # 0
>
> This seems to be the case for the following set of options:
> interactive-comments, keyword, monitor, noclobber, noglob, nolog, notify,
> nounset, onecmd, physical, pipefail, privileged, verbose, xtrace
>
> While it works correctly for:
> allexport, braceexpand, emacs, errexit, errtrace, functrace, hashall,
> histexpand, history, ignoreeof, noexec, posix, vi
>
>
--
Oğuz
Back to gnu.bash.bug | Previous | Next | Find similar
Re: $SHELLOPTS after function with `local -' Oğuz <oguzismailuysal@gmail.com> - 2020-07-24 11:21 +0300
csiph-web