Add note on quoting to swaymsg manpage

(cherry picked from commit acbe902815)
This commit is contained in:
Campbell Vertesi 2020-07-13 16:47:20 +02:00 committed by Simon Ser
parent 28bcb1e6f2
commit 105c69d431
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48

View file

@ -44,12 +44,18 @@ _swaymsg_ [options...] [message]
The message is a sway command (the same commands you can bind to keybindings The message is a sway command (the same commands you can bind to keybindings
in your sway config file). It will be executed immediately. in your sway config file). It will be executed immediately.
See **sway**(5) for a list of commands. See *sway*(5) for a list of commands.
Tip: If you are proving a command that contains a leading hyphen (_-_), Tips:
insert two hyphens (_--_) before the command to signal to swaymsg not to - Command expansion is performed twice: once by swaymsg, and again by sway.
parse anything beyond that point as an option. For example, use If you have quoted multi-word strings in your command, enclose the entire
_swaymsg -- mark --add test_ instead of _swaymsg mark --add test_ command in single-quotes. For example, use
_swaymsg 'output "Foobar Display" enable'_ instead of
_swaymsg output "Foobar Display" enable_.
- If you are proving a command that contains a leading hyphen (_-_), insert
two hyphens (_--_) before the command to signal to swaymsg not to parse
anything beyond that point as an option. For example, use
_swaymsg -- mark --add test_ instead of _swaymsg mark --add test_.
*get\_workspaces* *get\_workspaces*
Gets a JSON-encoded list of workspaces and their status. Gets a JSON-encoded list of workspaces and their status.