diff options
author | Ryan Dwyer <RyanDwyer@users.noreply.github.com> | 2018-08-19 16:16:32 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-19 16:16:32 +1000 |
commit | 389d159c81502aa8b951895de11c3720bbd5ba7d (patch) | |
tree | c5d96041e3270b1d1d50f8a42d91652d615c9938 /sway/commands/exec_always.c | |
parent | d0a24465d75cc7197ee253e1de9fa961071cd034 (diff) | |
parent | 7f22fab3895ff090d5e26936f4e964e081090164 (diff) |
Merge pull request #2453 from ianyfan/commands
More commands
Diffstat (limited to 'sway/commands/exec_always.c')
-rw-r--r-- | sway/commands/exec_always.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sway/commands/exec_always.c b/sway/commands/exec_always.c index 00e39ae7..5ce7919b 100644 --- a/sway/commands/exec_always.c +++ b/sway/commands/exec_always.c @@ -26,7 +26,16 @@ struct cmd_results *cmd_exec_always(int argc, char **argv) { return error; } - tmp = join_args(argv + 1, argc - 1); + --argc; ++argv; + } + + if (argv[0][0] == '\'' || argv[0][0] == '"') { + if (argc > 0) { + return cmd_results_new(CMD_INVALID, "exec_always", + "command cannot be partially quoted"); + } + tmp = strdup(argv[0]); + strip_quotes(tmp); } else { tmp = join_args(argv, argc); } |