summaryrefslogtreecommitdiffstats
path: root/cmd-show-environment.c
diff options
context:
space:
mode:
authornicm <nicm>2015-12-16 21:47:00 +0000
committernicm <nicm>2015-12-16 21:47:00 +0000
commit8eb1a7d5dc8d66ca7d17c72e4d8d0e58d6fd2824 (patch)
treedf2f03c8df687fbc577ee8328fd83a992224cc3d /cmd-show-environment.c
parent909b737289ee24f1c78c13c10d728a1cf990912d (diff)
showenv and setenv need to be CANFAIL.
Diffstat (limited to 'cmd-show-environment.c')
-rw-r--r--cmd-show-environment.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd-show-environment.c b/cmd-show-environment.c
index ad9e9e37..54baafe4 100644
--- a/cmd-show-environment.c
+++ b/cmd-show-environment.c
@@ -94,7 +94,7 @@ cmd_show_environment_exec(struct cmd *self, struct cmd_q *cmdq)
struct environ *env;
struct environ_entry *envent;
- if (args_has(self->args, 'g'))
+ if (args_has(self->args, 'g') || cmdq->state.tflag.s == NULL)
env = global_environ;
else
env = cmdq->state.tflag.s->environ;