aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-09-30 10:39:29 -0400
committerLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-09-30 10:39:29 -0400
commit87a70b35919949d79ae724760d4fcb06e4f7bc64 (patch)
tree8c70c61c8bc4a0b0f9a4ec5be22c875c2d24e28c /sway/commands.c
parentMerge pull request #2734 from ivyl/use_rpath (diff)
downloadsway-87a70b35919949d79ae724760d4fcb06e4f7bc64.tar.gz
sway-87a70b35919949d79ae724760d4fcb06e4f7bc64.tar.zst
sway-87a70b35919949d79ae724760d4fcb06e4f7bc64.zip
Do not strip quotes for exec or bind commands
Leave quotes intact for cmd_exec, cmd_exec_always, cmd_bindcode, and cmd_bindsym
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 03761c52..831d4492 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -391,7 +391,10 @@ struct cmd_results *config_command(char *exec) {
391 // Var replacement, for all but first argument of set 391 // Var replacement, for all but first argument of set
392 // TODO commands 392 // TODO commands
393 for (i = handler->handle == cmd_set ? 2 : 1; i < argc; ++i) { 393 for (i = handler->handle == cmd_set ? 2 : 1; i < argc; ++i) {
394 if (*argv[i] == '\"' || *argv[i] == '\'') { 394 if (handler->handle != cmd_exec && handler->handle != cmd_exec_always
395 && handler->handle != cmd_bindsym
396 && handler->handle != cmd_bindcode
397 && (*argv[i] == '\"' || *argv[i] == '\'')) {
395 strip_quotes(argv[i]); 398 strip_quotes(argv[i]);
396 } 399 }
397 argv[i] = do_var_replacement(argv[i]); 400 argv[i] = do_var_replacement(argv[i]);