Quote the output of the no-argument form of the `set' builtin for re-input
to the shell.
This commit is contained in:
parent
45086f8cf6
commit
592588448e
10
bin/sh/var.c
10
bin/sh/var.c
@ -508,11 +508,17 @@ showvarscmd(int argc __unused, char **argv __unused)
|
||||
{
|
||||
struct var **vpp;
|
||||
struct var *vp;
|
||||
const char *s;
|
||||
|
||||
for (vpp = vartab ; vpp < vartab + VTABSIZE ; vpp++) {
|
||||
for (vp = *vpp ; vp ; vp = vp->next) {
|
||||
if ((vp->flags & VUNSET) == 0)
|
||||
out1fmt("%s\n", vp->text);
|
||||
if (vp->flags & VUNSET)
|
||||
continue;
|
||||
for (s = vp->text; *s != '='; s++)
|
||||
out1c(*s);
|
||||
out1c('=');
|
||||
out1qstr(s + 1);
|
||||
out1c('\n');
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user