mirror of
https://github.com/swaywm/sway.git
synced 2025-01-15 08:46:40 +01:00
Strip quotes of each argv when handling command
This commit is contained in:
parent
222f0d44fc
commit
fc8e5703a5
1 changed files with 5 additions and 2 deletions
|
@ -2476,8 +2476,11 @@ struct cmd_results *handle_command(char *_exec) {
|
||||||
//TODO better handling of argv
|
//TODO better handling of argv
|
||||||
int argc;
|
int argc;
|
||||||
char **argv = split_args(cmd, &argc);
|
char **argv = split_args(cmd, &argc);
|
||||||
if (argc>1 && (*argv[1] == '\"' || *argv[1] == '\'')) {
|
int i;
|
||||||
strip_quotes(argv[1]);
|
for (i = 1; i < argc; ++i) {
|
||||||
|
if (*argv[i] == '\"' || *argv[i] == '\'') {
|
||||||
|
strip_quotes(argv[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
struct cmd_handler *handler = find_handler(argv[0], CMD_BLOCK_END);
|
struct cmd_handler *handler = find_handler(argv[0], CMD_BLOCK_END);
|
||||||
if (!handler) {
|
if (!handler) {
|
||||||
|
|
Loading…
Reference in a new issue