mirror of
https://github.com/swaywm/sway.git
synced 2025-11-18 06:59:48 -05:00
Add -p/--pretty option to swaymsg
This new option forces pretty (non-raw/non-JSON) output. By default, when not using a tty, swaymsg outputs using the "raw" format. This makes it impossible to, for example, pipe the pretty output to a pager such as `less` since piping does not use a tty. The new -p/--pretty option gives the user explicit control over the output format while retaining the default tty-dependent behavior. Signed-off-by: Peter Grayson <pete@jpgrayson.net>
This commit is contained in:
parent
c8085038cf
commit
bedf2ac2fb
5 changed files with 17 additions and 5 deletions
|
|
@ -21,6 +21,7 @@ _swaymsg()
|
|||
|
||||
short=(
|
||||
-h
|
||||
-p
|
||||
-q
|
||||
-r
|
||||
-s
|
||||
|
|
@ -30,6 +31,7 @@ _swaymsg()
|
|||
|
||||
long=(
|
||||
--help
|
||||
--pretty
|
||||
--quiet
|
||||
--raw
|
||||
--socket
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue