ash: fix set -o to not show "nameless" options
Patch by Martijn Dekker <martijn@inlv.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
16474cf246
commit
2f9c124f7d
@ -11091,6 +11091,8 @@ plus_minus_o(char *name, int val)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
for (i = 0; i < NOPTS; i++) {
|
for (i = 0; i < NOPTS; i++) {
|
||||||
|
if (optnames(i)[0] == '\0')
|
||||||
|
continue;
|
||||||
if (val) {
|
if (val) {
|
||||||
out1fmt("%-16s%s\n", optnames(i), optlist[i] ? "on" : "off");
|
out1fmt("%-16s%s\n", optnames(i), optlist[i] ? "on" : "off");
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user