diff options
author | Thomas Adam <thomas@xteddy.org> | 2017-04-22 12:01:19 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2017-04-22 12:01:19 +0100 |
commit | e802b683ea0ebfa377a5bb8a6b03454c1edbe2d5 (patch) | |
tree | 7a495bed6d4d979974826a11707f1c2585173768 /cmd-show-environment.c | |
parent | b08e451c916fd942b9d24706583ccedf307e0877 (diff) | |
parent | 55cd4c7bc756509f241788f7f73676676ef538f6 (diff) | |
download | rtmux-e802b683ea0ebfa377a5bb8a6b03454c1edbe2d5.tar.gz rtmux-e802b683ea0ebfa377a5bb8a6b03454c1edbe2d5.tar.bz2 rtmux-e802b683ea0ebfa377a5bb8a6b03454c1edbe2d5.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-show-environment.c')
-rw-r--r-- | cmd-show-environment.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd-show-environment.c b/cmd-show-environment.c index 8b38de2c..eb19cf20 100644 --- a/cmd-show-environment.c +++ b/cmd-show-environment.c @@ -41,7 +41,7 @@ const struct cmd_entry cmd_show_environment_entry = { .args = { "gst:", 0, 1 }, .usage = "[-gs] " CMD_TARGET_SESSION_USAGE " [name]", - .tflag = CMD_SESSION_CANFAIL, + .target = { 't', CMD_FIND_SESSION, CMD_FIND_CANFAIL }, .flags = CMD_AFTERHOOK, .exec = cmd_show_environment_exec @@ -97,7 +97,7 @@ cmd_show_environment_exec(struct cmd *self, struct cmdq_item *item) const char *target; if ((target = args_get(args, 't')) != NULL) { - if (item->state.tflag.s == NULL) { + if (item->target.s == NULL) { cmdq_error(item, "no such session: %s", target); return (CMD_RETURN_ERROR); } @@ -106,7 +106,7 @@ cmd_show_environment_exec(struct cmd *self, struct cmdq_item *item) if (args_has(self->args, 'g')) env = global_environ; else { - if (item->state.tflag.s == NULL) { + if (item->target.s == NULL) { target = args_get(args, 't'); if (target != NULL) cmdq_error(item, "no such session: %s", target); @@ -114,7 +114,7 @@ cmd_show_environment_exec(struct cmd *self, struct cmdq_item *item) cmdq_error(item, "no current session"); return (CMD_RETURN_ERROR); } - env = item->state.tflag.s->environ; + env = item->target.s->environ; } if (args->argc != 0) { |