diff options
Diffstat (limited to 'bin/sh/options.c')
-rw-r--r-- | bin/sh/options.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/bin/sh/options.c b/bin/sh/options.c index af80036..389e555 100644 --- a/bin/sh/options.c +++ b/bin/sh/options.c @@ -261,13 +261,12 @@ minus_o(char *name, int val) optlist[i].val ? "on" : "off"); } else { /* Output suitable for re-input to shell. */ - for (i = 0; i < NOPTS; i++) { - if (i % 6 == 0) - out1str(i == 0 ? "set" : "\nset"); - out1fmt(" %co %s", optlist[i].val ? '-' : '+', - optlist[i].name); - } - out1c('\n'); + for (i = 0; i < NOPTS; i++) + out1fmt("%s %co %s%s", + i % 6 == 0 ? "set" : "", + optlist[i].val ? '-' : '+', + optlist[i].name, + i % 6 == 5 || i == NOPTS - 1 ? "\n" : ""); } } else { for (i = 0; i < NOPTS; i++) |