mirror of
https://github.com/swaywm/sway.git
synced 2025-11-07 13:29:56 -05:00
Add quotes to multiword arguments.
This adds quotes around multiword arguments before they are passed to
`/bin/sh -c` in an exec command.
Example:
I connect to irc like this:
exec termite -e "mosh server tmux a"
Without this patch the arguments are passed to sh as:
termite -e mosh server tmux a
When it should be:
termite -e "mosh server tmux a"
For the command to work.
This commit is contained in:
parent
ed227f5664
commit
32ae26e519
3 changed files with 33 additions and 0 deletions
|
|
@ -361,8 +361,10 @@ 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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue