diff options
Diffstat (limited to '')
-rw-r--r-- | src/options.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/options.c b/src/options.c index f669117..48c9671 100644 --- a/src/options.c +++ b/src/options.c @@ -240,10 +240,18 @@ minus_o(char *name, int val) int i; if (name == NULL) { - out1str("Current option settings\n"); - for (i = 0; i < NOPTS; i++) - out1fmt("%-16s%s\n", optnames[i], - optlist[i] ? "on" : "off"); + if (val) { + out1str("Current option settings\n"); + for (i = 0; i < NOPTS; i++) + out1fmt("%-16s%s\n", optnames[i], + optlist[i] ? "on" : "off"); + } else { + for (i = 0; i < NOPTS; i++) + out1fmt("set %s %s\n", + optlist[i] ? "-o" : "+o", + optnames[i]); + + } } else { for (i = 0; i < NOPTS; i++) if (equal(name, optnames[i])) { |