1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-01 05:16:05 +01:00

38039: POSIXy behavior for "set +o"

This commit is contained in:
Barton E. Schaefer 2016-03-03 13:01:08 -08:00
parent f7d5ff31ce
commit 6756870a92
2 changed files with 8 additions and 3 deletions

View file

@ -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> 2016-02-26 Peter Stephenson <p.w.stephenson@ntlworld.com>
* Stephane: 38020: fix problems with fractions of a second in * Stephane: 38020: fix problems with fractions of a second in

View file

@ -847,9 +847,10 @@ printoptionnodestate(HashNode hn, int hadplus)
int optno = on->optno; int optno = on->optno;
if (hadplus) { if (hadplus) {
if (defset(on, emulation) != isset(optno)) printf("set %co %s%s\n",
printf("set -o %s%s\n", defset(on, emulation) ? defset(on, emulation) != isset(optno) ? '-' : '+',
"no" : "", on->node.nam); defset(on, emulation) ? "no" : "",
on->node.nam);
} else { } else {
if (defset(on, emulation)) if (defset(on, emulation))
printf("no%-19s %s\n", on->node.nam, isset(optno) ? "off" : "on"); printf("no%-19s %s\n", on->node.nam, isset(optno) ? "off" : "on");