summaryrefslogtreecommitdiffstats
path: root/bin/sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/sh')
-rw-r--r--bin/sh/var.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/bin/sh/var.c b/bin/sh/var.c
index 0af1eeb..8a3abb7 100644
--- a/bin/sh/var.c
+++ b/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;
OpenPOWER on IntegriCloud