summaryrefslogtreecommitdiffstats
path: root/cmd-show-environment.c
diff options
context:
space:
mode:
authornicm <nicm>2020-04-13 08:26:27 +0000
committernicm <nicm>2020-04-13 08:26:27 +0000
commitc20eb0c0ae3347c768894a6355adfd7ebae6f2f3 (patch)
tree970e82f29bd603d459476d44245ce73aad18666e /cmd-show-environment.c
parent9cbe9675ea8a8efb01dcc5f267e6d5853b2cd58f (diff)
Make struct cmd local to cmd.c and move it out of tmux.h.
Diffstat (limited to 'cmd-show-environment.c')
-rw-r--r--cmd-show-environment.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd-show-environment.c b/cmd-show-environment.c
index 0d2f7dd9..be6209dd 100644
--- a/cmd-show-environment.c
+++ b/cmd-show-environment.c
@@ -69,7 +69,7 @@ static void
cmd_show_environment_print(struct cmd *self, struct cmdq_item *item,
struct environ_entry *envent)
{
- struct args *args = self->args;
+ struct args *args = cmd_get_args(self);
char *escaped;
if (!args_has(args, 'h') && (envent->flags & ENVIRON_HIDDEN))
@@ -77,7 +77,7 @@ cmd_show_environment_print(struct cmd *self, struct cmdq_item *item,
if (args_has(args, 'h') && (~envent->flags & ENVIRON_HIDDEN))
return;
- if (!args_has(self->args, 's')) {
+ if (!args_has(args, 's')) {
if (envent->value != NULL)
cmdq_print(item, "%s=%s", envent->name, envent->value);
else
@@ -97,7 +97,7 @@ cmd_show_environment_print(struct cmd *self, struct cmdq_item *item,
static enum cmd_retval
cmd_show_environment_exec(struct cmd *self, struct cmdq_item *item)
{
- struct args *args = self->args;
+ struct args *args = cmd_get_args(self);
struct environ *env;
struct environ_entry *envent;
const char *target;
@@ -109,7 +109,7 @@ cmd_show_environment_exec(struct cmd *self, struct cmdq_item *item)
}
}
- if (args_has(self->args, 'g'))
+ if (args_has(args, 'g'))
env = global_environ;
else {
if (item->target.s == NULL) {