diff options
author | Thomas Adam <thomas@xteddy.org> | 2017-03-08 14:01:23 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2017-03-08 14:01:23 +0000 |
commit | 3ea36830f38eed2d6dad6cb057b3efe772237d5e (patch) | |
tree | dad4d842a60527c85e904f63c3e29c596629f4d4 /cmd-if-shell.c | |
parent | 5d3296c53b820664d50d96b2b926f2c2c1105e97 (diff) | |
parent | 6b2009ad725b662853b8e94aee233fabdc5490f9 (diff) | |
download | rtmux-3ea36830f38eed2d6dad6cb057b3efe772237d5e.tar.gz rtmux-3ea36830f38eed2d6dad6cb057b3efe772237d5e.tar.bz2 rtmux-3ea36830f38eed2d6dad6cb057b3efe772237d5e.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-if-shell.c')
-rw-r--r-- | cmd-if-shell.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/cmd-if-shell.c b/cmd-if-shell.c index ec4bf68e..f7d95d53 100644 --- a/cmd-if-shell.c +++ b/cmd-if-shell.c @@ -69,10 +69,10 @@ cmd_if_shell_exec(struct cmd *self, struct cmdq_item *item) char *shellcmd, *cmd, *cause; struct cmd_list *cmdlist; struct cmdq_item *new_item; + struct client *c = item->state.c; struct session *s = item->state.tflag.s; struct winlink *wl = item->state.tflag.wl; struct window_pane *wp = item->state.tflag.wp; - struct format_tree *ft; const char *cwd; if (item->client != NULL && item->client->session == NULL) @@ -82,11 +82,7 @@ cmd_if_shell_exec(struct cmd *self, struct cmdq_item *item) else cwd = NULL; - ft = format_create(item, FORMAT_NONE, 0); - format_defaults(ft, item->state.c, s, wl, wp); - shellcmd = format_expand(ft, args->argv[0]); - format_free(ft); - + shellcmd = format_single(item, args->argv[0], c, s, wl, wp); if (args_has(args, 'F')) { cmd = NULL; if (*shellcmd != '0' && *shellcmd != '\0') |