diff options
author | Thomas Adam <thomas@xteddy.org> | 2018-05-24 13:02:29 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2018-05-24 13:02:29 +0100 |
commit | 7448b38327f856dae6ce915eae63f7f6c3f036e0 (patch) | |
tree | e38b2964d8261f2103f633b26995d5d2d38c7b94 /cmd-if-shell.c | |
parent | 85d5a377c53d711ff923f1b5f9184f2f96c29c41 (diff) | |
parent | b9a6162d2f9bea63c3ad421e9c3969eea2852b00 (diff) | |
download | rtmux-7448b38327f856dae6ce915eae63f7f6c3f036e0.tar.gz rtmux-7448b38327f856dae6ce915eae63f7f6c3f036e0.tar.bz2 rtmux-7448b38327f856dae6ce915eae63f7f6c3f036e0.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-if-shell.c')
-rw-r--r-- | cmd-if-shell.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/cmd-if-shell.c b/cmd-if-shell.c index 304fe910..d7ce3039 100644 --- a/cmd-if-shell.c +++ b/cmd-if-shell.c @@ -73,14 +73,6 @@ cmd_if_shell_exec(struct cmd *self, struct cmdq_item *item) struct session *s = item->target.s; struct winlink *wl = item->target.wl; struct window_pane *wp = item->target.wp; - const char *cwd; - - if (item->client != NULL && item->client->session == NULL) - cwd = item->client->cwd; - else if (s != NULL) - cwd = s->cwd; - else - cwd = NULL; shellcmd = format_single(item, args->argv[0], c, s, wl, wp); if (args_has(args, 'F')) { @@ -128,8 +120,8 @@ cmd_if_shell_exec(struct cmd *self, struct cmdq_item *item) cdata->item = NULL; memcpy(&cdata->mouse, &shared->mouse, sizeof cdata->mouse); - job_run(shellcmd, s, cwd, NULL, cmd_if_shell_callback, - cmd_if_shell_free, cdata, 0); + job_run(shellcmd, s, server_client_get_cwd(item->client, s), NULL, + cmd_if_shell_callback, cmd_if_shell_free, cdata, 0); free(shellcmd); if (args_has(args, 'b')) |