diff options
| author | Isaac Freund <ifreund@ifreund.xyz> | 2021-07-16 00:00:28 +0200 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2021-07-21 14:07:49 +0200 |
| commit | b7e15a8ef6b223fa5195fa9b149dc83764677429 (patch) | |
| tree | 63ee36279183c403dabcdb70e4d2c5c96c2ef16b /doc/riverctl.1.scd | |
| parent | dfa24711415a48edb0fed64e3c3feaaf61130c8b (diff) | |
| download | river-b7e15a8ef6b223fa5195fa9b149dc83764677429.tar.gz river-b7e15a8ef6b223fa5195fa9b149dc83764677429.tar.xz | |
river: make spawn command take only one argument
Currently the spawn command takes any number of arguments and naively
joins them together with spaces before passing them as the single
argument of `/bin/sh -c`. This however produces unexpected results as
soon as shell quoting gets involved in the arguments passed to spawn.
For example, running
riverctl spawn foo "bar baz"
will execute `/bin/sh -c "foo bar baz"`, unexpectedly splitting bar and
baz into separate arguments. To avoid this confusion, make the spawn
command take only a single argument, forcing the user to quote properly
to spawn multi-argument commands.
Diffstat (limited to 'doc/riverctl.1.scd')
| -rw-r--r-- | doc/riverctl.1.scd | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/riverctl.1.scd b/doc/riverctl.1.scd index 994c78d..060888e 100644 --- a/doc/riverctl.1.scd +++ b/doc/riverctl.1.scd @@ -65,9 +65,9 @@ over the Wayland protocol. output in any direction. *spawn* _shell_command_ - Run _shell_command_ using _/bin/sh -c_. Put single quotes around - _shell_command_ if you do not want special characters to get - interpreted by your shell before the command gets passed to _/bin/sh_. + Run _shell_command_ using `/bin/sh -c _shell_command_`. Note that + *spawn* only takes a single argument. To spawn a command taking + multiple arguments, wrapping the command in quotes is recommended. *swap* *next*|*previous* Swap the focused view with the next/previous visible non-floating @@ -336,9 +336,9 @@ However note that not every input device supports every property. # EXAMPLES -Bind bemenu-run to Super+P in normal mode: +Bind Super+Enter in normal mode to spawn a *foot*(1) terminal: - riverctl map normal Mod4 P spawn bemenu-run + riverctl map normal Mod4 Enter spawn 'foot --app-id=foobar' See also the example init script at /etc/river/init. |
