1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-12-29 16:25:35 +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>
* 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;
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");