aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
Diffstat (limited to 'sway')
-rw-r--r--sway/commands/exec_always.c11
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);
}