mirror of
https://github.com/swaywm/sway.git
synced 2024-12-28 16:06:37 +01:00
commands: handle quoted exec command
This commit is contained in:
parent
453646b887
commit
69e00151bb
1 changed files with 10 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue