Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam 2015-12-16 22:01:08 +00:00
commit 7c94dae702
2 changed files with 3 additions and 3 deletions

View File

@ -36,7 +36,7 @@ const struct cmd_entry cmd_set_environment_entry = {
.args = { "grt:u", 1, 2 }, .args = { "grt:u", 1, 2 },
.usage = "[-gru] " CMD_TARGET_SESSION_USAGE " name [value]", .usage = "[-gru] " CMD_TARGET_SESSION_USAGE " name [value]",
.tflag = CMD_SESSION, .tflag = CMD_SESSION_CANFAIL,
.flags = 0, .flags = 0,
.exec = cmd_set_environment_exec .exec = cmd_set_environment_exec
@ -64,7 +64,7 @@ cmd_set_environment_exec(struct cmd *self, struct cmd_q *cmdq)
else else
value = args->argv[1]; value = args->argv[1];
if (args_has(self->args, 'g')) if (args_has(self->args, 'g') || cmdq->state.tflag.s == NULL)
env = global_environ; env = global_environ;
else else
env = cmdq->state.tflag.s->environ; env = cmdq->state.tflag.s->environ;

View File

@ -94,7 +94,7 @@ cmd_show_environment_exec(struct cmd *self, struct cmd_q *cmdq)
struct environ *env; struct environ *env;
struct environ_entry *envent; struct environ_entry *envent;
if (args_has(self->args, 'g')) if (args_has(self->args, 'g') || cmdq->state.tflag.s == NULL)
env = global_environ; env = global_environ;
else else
env = cmdq->state.tflag.s->environ; env = cmdq->state.tflag.s->environ;