Quote the output of the no-argument form of the `set' builtin for re-input

to the shell.
This commit is contained in:
Tim J. Robbins 2002-06-06 04:02:50 +00:00
parent 45086f8cf6
commit 592588448e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=97915

View File

@ -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;