From 6756870a9263f510f19b395b37a29e35168f8917 Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Thu, 3 Mar 2016 13:01:08 -0800 Subject: 38039: POSIXy behavior for "set +o" --- Src/options.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Src') 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"); -- cgit 1.4.1