diff options
author | Barton E. Schaefer <schaefer@zsh.org> | 2016-03-03 13:01:08 -0800 |
---|---|---|
committer | Barton E. Schaefer <schaefer@zsh.org> | 2016-03-03 13:01:08 -0800 |
commit | 6756870a9263f510f19b395b37a29e35168f8917 (patch) | |
tree | 83c668ba4bfa79780e336733979f3a3e3c815a7b | |
parent | f7d5ff31ce8d354dd69de619e703b9c0e49f0977 (diff) | |
download | zsh-6756870a9263f510f19b395b37a29e35168f8917.tar.gz zsh-6756870a9263f510f19b395b37a29e35168f8917.tar.xz zsh-6756870a9263f510f19b395b37a29e35168f8917.zip |
38039: POSIXy behavior for "set +o"
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Src/options.c | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog index 8498c5954..6b80b19f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2016-03-03 Barton E. Schaefer <schaefer@zsh.org> + + * 38039: Src/options.c: POSIXy behavior for "set +o" + 2016-02-26 Peter Stephenson <p.w.stephenson@ntlworld.com> * Stephane: 38020: fix problems with fractions of a second in diff --git a/Src/options.c b/Src/options.c index 17c46c311..18619c851 100644 --- a/Src/options.c +++ b/Src/options.c @@ -847,9 +847,10 @@ printoptionnodestate(HashNode hn, int hadplus) int optno = on->optno; if (hadplus) { - if (defset(on, emulation) != isset(optno)) - printf("set -o %s%s\n", defset(on, emulation) ? - "no" : "", on->node.nam); + printf("set %co %s%s\n", + defset(on, emulation) != isset(optno) ? '-' : '+', + defset(on, emulation) ? "no" : "", + on->node.nam); } else { if (defset(on, emulation)) printf("no%-19s %s\n", on->node.nam, isset(optno) ? "off" : "on"); |