diff --git a/cmd-if-shell.c b/cmd-if-shell.c index 2f47a0d7..7d3e8e12 100644 --- a/cmd-if-shell.c +++ b/cmd-if-shell.c @@ -81,7 +81,7 @@ cmd_if_shell_exec(struct cmd *self, struct cmd_q *cmdq) cwd = NULL; ft = format_create(cmdq, 0); - format_defaults(ft, NULL, s, wl, wp); + format_defaults(ft, cmdq->state.c, s, wl, wp); shellcmd = format_expand(ft, args->argv[0]); format_free(ft);