Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't strip quotes from exec args #519

Merged
merged 1 commit into from
Mar 18, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions sway/commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,8 @@ static struct cmd_results *cmd_exec_always(int argc, char **argv) {
return error;
}

add_quotes(argv + 1, argc - 1);
tmp = join_args(argv + 1, argc - 1);
} else {
add_quotes(argv, argc);
tmp = join_args(argv, argc);
}

Expand Down Expand Up @@ -2869,10 +2867,12 @@ struct cmd_results *handle_command(char *_exec) {
//TODO better handling of argv
int argc;
char **argv = split_args(cmd, &argc);
int i;
for (i = 1; i < argc; ++i) {
if (*argv[i] == '\"' || *argv[i] == '\'') {
strip_quotes(argv[i]);
if (strcmp(argv[0], "exec") != 0) {
int i;
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);
Expand Down