diff options
Diffstat (limited to 'sway/commands.c')
-rw-r--r-- | sway/commands.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/sway/commands.c b/sway/commands.c index bff230f7..72db8ab9 100644 --- a/sway/commands.c +++ b/sway/commands.c @@ -110,6 +110,7 @@ static struct cmd_handler handlers[] = { { "seat", cmd_seat }, { "set", cmd_set }, { "show_marks", cmd_show_marks }, + { "smart_borders", cmd_smart_borders }, { "smart_gaps", cmd_smart_gaps }, { "tiling_drag", cmd_tiling_drag }, { "workspace", cmd_workspace }, @@ -391,14 +392,16 @@ struct cmd_results *config_command(char *exec) { // Var replacement, for all but first argument of set // TODO commands for (i = handler->handle == cmd_set ? 2 : 1; i < argc; ++i) { + if (handler->handle != cmd_exec && handler->handle != cmd_exec_always + && handler->handle != cmd_bindsym + && handler->handle != cmd_bindcode + && handler->handle != cmd_set + && (*argv[i] == '\"' || *argv[i] == '\'')) { + strip_quotes(argv[i]); + } argv[i] = do_var_replacement(argv[i]); unescape_string(argv[i]); } - // Strip quotes for first argument. - // TODO This part needs to be handled much better - if (argc>1 && (*argv[1] == '\"' || *argv[1] == '\'')) { - strip_quotes(argv[1]); - } if (handler->handle) { results = handler->handle(argc-1, argv+1); } else { @@ -422,11 +425,6 @@ struct cmd_results *config_subcommand(char **argv, int argc, char *input = argv[0] ? argv[0] : "(empty)"; return cmd_results_new(CMD_INVALID, input, "Unknown/invalid command"); } - // Strip quotes for first argument. - // TODO This part needs to be handled much better - if (argc > 1 && (*argv[1] == '\"' || *argv[1] == '\'')) { - strip_quotes(argv[1]); - } if (handler->handle) { return handler->handle(argc - 1, argv + 1); } |