diff --git a/ci/update-derived-files.sh b/ci/update-derived-files.sh index 2b57387d8..fb6b17aed 100755 --- a/ci/update-derived-files.sh +++ b/ci/update-derived-files.sh @@ -22,3 +22,8 @@ for cmd in start ssh serial connect ls-fonts show-keys imgcat set-working-direct fname="docs/examples/cmd-synopsis-wezterm-${cmd}--help.txt" cargo run --example narrow $PWD/target/debug/wezterm $cmd --help | ./target/debug/strip-ansi-escapes > $fname done + +for cmd in list list-clients move-pane-to-new-tab split-pane spawn send-text get-text activate-pane-direction ; do + fname="docs/examples/cmd-synopsis-wezterm-cli-${cmd}--help.txt" + cargo run --example narrow $PWD/target/debug/wezterm cli $cmd --help | ./target/debug/strip-ansi-escapes > $fname +done diff --git a/docs/cli/cli/activate-pane-direction.md b/docs/cli/cli/activate-pane-direction.md index f8caa6c72..652cf2182 100644 --- a/docs/cli/cli/activate-pane-direction.md +++ b/docs/cli/cli/activate-pane-direction.md @@ -12,3 +12,8 @@ ignoring case so you can use `left` rather than `Left`: * `Left`, `Right`, `Up`, `Down` to activate based on direction * `Next`, `Prev` to cycle based on the ordinal position in the pane tree. +## Synopsis + +```console +{% include "../../examples/cmd-synopsis-wezterm-cli-activate-pane-direction--help.txt" %} +``` diff --git a/docs/cli/cli/get-text.md b/docs/cli/cli/get-text.md index 9e51ac350..210c09d10 100644 --- a/docs/cli/cli/get-text.md +++ b/docs/cli/cli/get-text.md @@ -25,3 +25,9 @@ The default capture region is the main terminal screen, not including the scroll You may use the `--start-line` and `--end-line` parameters to set the range. Both of these accept integer values, where `0` refers to the top of the non-scrollback screen area, and negative numbers index backwards into the scrollback. + +## Synopsis + +```console +{% include "../../examples/cmd-synopsis-wezterm-cli-get-text--help.txt" %} +``` diff --git a/docs/cli/cli/list-clients.md b/docs/cli/cli/list-clients.md index ba6f5d861..86e8fddfb 100644 --- a/docs/cli/cli/list-clients.md +++ b/docs/cli/cli/list-clients.md @@ -44,3 +44,9 @@ $ wezterm cli list-clients --format json } ] ``` + +## Synopsis + +```console +{% include "../../examples/cmd-synopsis-wezterm-cli-list-clients--help.txt" %} +``` diff --git a/docs/cli/cli/list.md b/docs/cli/cli/list.md index ca24ece05..44a117f01 100644 --- a/docs/cli/cli/list.md +++ b/docs/cli/cli/list.md @@ -43,3 +43,9 @@ $ wezterm cli list --format json } ] ``` + +## Synopsis + +```console +{% include "../../examples/cmd-synopsis-wezterm-cli-list--help.txt" %} +``` diff --git a/docs/cli/cli/move-pane-to-new-tab.md b/docs/cli/cli/move-pane-to-new-tab.md index 7e765eb06..33b69cdeb 100644 --- a/docs/cli/cli/move-pane-to-new-tab.md +++ b/docs/cli/cli/move-pane-to-new-tab.md @@ -13,3 +13,9 @@ The following arguments modify the behavior: * `--window-id WINDOW_ID` - Create the new tab in the specified window id rather than the current window. * `--workspace WORKSPACE` - When using `--new-window`, use `WORKSPACE` as the name of the workspace for the newly created window rather than the default workspace name `"default"`. * `--pane-id` - Specifies which pane to move. See also [Targeting Panes](index.md#targeting-panes). + +## Synopsis + +```console +{% include "../../examples/cmd-synopsis-wezterm-cli-move-pane-to-new-tab--help.txt" %} +``` diff --git a/docs/cli/cli/send-text.md b/docs/cli/cli/send-text.md index 2d0d702fb..ea50faaea 100644 --- a/docs/cli/cli/send-text.md +++ b/docs/cli/cli/send-text.md @@ -23,3 +23,9 @@ The following arguments modify the behavior: * `--no-paste` - Send the text directly, rather than as a bracketed paste. {{since('20220624-141144-bd1b7c5d', inline=True)}} * `--pane-id` - Specifies which pane to send the text to. See also [Targeting Panes](index.md#targeting-panes). + +## Synopsis + +```console +{% include "../../examples/cmd-synopsis-wezterm-cli-send-text--help.txt" %} +``` diff --git a/docs/cli/cli/spawn.md b/docs/cli/cli/spawn.md index d9df372a3..f5370b5f6 100644 --- a/docs/cli/cli/spawn.md +++ b/docs/cli/cli/spawn.md @@ -41,3 +41,9 @@ The following options affect the behavior: * `--workspace WORKSPACE` - when using `--new-window`, set the workspace name rather than using the default name of `"default"`. * `--window-id WINDOW_ID` - Spawn the tab into the specified window, rather than using the current window + +## Synopsis + +```console +{% include "../../examples/cmd-synopsis-wezterm-cli-spawn--help.txt" %} +``` diff --git a/docs/cli/cli/split-pane.md b/docs/cli/cli/split-pane.md index 1af4909f0..50097a050 100644 --- a/docs/cli/cli/split-pane.md +++ b/docs/cli/cli/split-pane.md @@ -48,3 +48,8 @@ The following options affect the behavior: * `--top` - Split vertically, with the new pane on the top. * `--top-level` - Rather than splitting the active pane, split the entire window. +## Synopsis + +```console +{% include "../../examples/cmd-synopsis-wezterm-cli-split-pane--help.txt" %} +``` diff --git a/docs/examples/cmd-synopsis-wezterm--help.txt b/docs/examples/cmd-synopsis-wezterm--help.txt index 55b776e5a..190b77049 100644 --- a/docs/examples/cmd-synopsis-wezterm--help.txt +++ b/docs/examples/cmd-synopsis-wezterm--help.txt @@ -1,4 +1,3 @@ - Wez's Terminal Emulator http://github.com/wez/wezterm diff --git a/docs/examples/cmd-synopsis-wezterm-cli-activate-pane-direction--help.txt b/docs/examples/cmd-synopsis-wezterm-cli-activate-pane-direction--help.txt new file mode 100644 index 000000000..abee2fa2c --- /dev/null +++ b/docs/examples/cmd-synopsis-wezterm-cli-activate-pane-direction--help.txt @@ -0,0 +1,10 @@ +Activate an adjacent pane in the specified direction + +Usage: wezterm cli activate-pane-direction + +Arguments: + The direction to switch to [possible values: Up, Down, Left, + Right, Next, Prev] + +Options: + -h, --help Print help diff --git a/docs/examples/cmd-synopsis-wezterm-cli-get-text--help.txt b/docs/examples/cmd-synopsis-wezterm-cli-get-text--help.txt new file mode 100644 index 000000000..a57e56f55 --- /dev/null +++ b/docs/examples/cmd-synopsis-wezterm-cli-get-text--help.txt @@ -0,0 +1,21 @@ +Retrieves the textual content of a pane and output it to stdout + +Usage: wezterm cli get-text [OPTIONS] + +Options: + --pane-id + Specify the target pane. The default is to use the current pane based + on the environment variable WEZTERM_PANE + --start-line + The starting line number. 0 is the first line of terminal screen. + Negative numbers proceed backwards into the scrollback. The default + value is unspecified is 0, the first line of the terminal screen + --end-line + The ending line number. 0 is the first line of terminal screen. + Negative numbers proceed backwards into the scrollback. The default + value if unspecified is the bottom of the the terminal screen + --escapes + Include escape sequences that color and style the text. If omitted, + unattributed text will be returned + -h, --help + Print help diff --git a/docs/examples/cmd-synopsis-wezterm-cli-list--help.txt b/docs/examples/cmd-synopsis-wezterm-cli-list--help.txt new file mode 100644 index 000000000..8682bd2ca --- /dev/null +++ b/docs/examples/cmd-synopsis-wezterm-cli-list--help.txt @@ -0,0 +1,8 @@ +list windows, tabs and panes + +Usage: wezterm cli list [OPTIONS] + +Options: + --format Controls the output format. "table" and "json" are + possible formats [default: table] + -h, --help Print help diff --git a/docs/examples/cmd-synopsis-wezterm-cli-list-clients--help.txt b/docs/examples/cmd-synopsis-wezterm-cli-list-clients--help.txt new file mode 100644 index 000000000..3202f36d8 --- /dev/null +++ b/docs/examples/cmd-synopsis-wezterm-cli-list-clients--help.txt @@ -0,0 +1,8 @@ +list clients + +Usage: wezterm cli list-clients [OPTIONS] + +Options: + --format Controls the output format. "table" and "json" are + possible formats [default: table] + -h, --help Print help diff --git a/docs/examples/cmd-synopsis-wezterm-cli-move-pane-to-new-tab--help.txt b/docs/examples/cmd-synopsis-wezterm-cli-move-pane-to-new-tab--help.txt new file mode 100644 index 000000000..7d8f5251c --- /dev/null +++ b/docs/examples/cmd-synopsis-wezterm-cli-move-pane-to-new-tab--help.txt @@ -0,0 +1,17 @@ +Move a pane into a new tab + +Usage: wezterm cli move-pane-to-new-tab [OPTIONS] + +Options: + --pane-id Specify the pane that should be moved. The + default is to use the current pane based on the + environment variable WEZTERM_PANE + --window-id Specify the window into which the new tab will be + created. If omitted, the window associated with + the current pane is used + --new-window Create tab in a new window, rather than the + window currently containing the pane + --workspace If creating a new window, override the default + workspace name with the provided name. The + default name is "default" + -h, --help Print help diff --git a/docs/examples/cmd-synopsis-wezterm-cli-send-text--help.txt b/docs/examples/cmd-synopsis-wezterm-cli-send-text--help.txt new file mode 100644 index 000000000..cb62d3693 --- /dev/null +++ b/docs/examples/cmd-synopsis-wezterm-cli-send-text--help.txt @@ -0,0 +1,15 @@ +Send text to a pane as though it were pasted. If bracketed paste mode is enabled +in the pane, then the text will be sent as a bracketed paste + +Usage: wezterm cli send-text [OPTIONS] [TEXT] + +Arguments: + [TEXT] The text to send. If omitted, will read the text from stdin + +Options: + --pane-id Specify the target pane. The default is to use the + current pane based on the environment variable + WEZTERM_PANE + --no-paste Send the text directly, rather than as a bracketed + paste + -h, --help Print help diff --git a/docs/examples/cmd-synopsis-wezterm-cli-spawn--help.txt b/docs/examples/cmd-synopsis-wezterm-cli-spawn--help.txt new file mode 100644 index 000000000..e32f3e82c --- /dev/null +++ b/docs/examples/cmd-synopsis-wezterm-cli-spawn--help.txt @@ -0,0 +1,31 @@ +Spawn a command into a new window or tab +Outputs the pane-id for the newly created pane on success + +Usage: wezterm cli spawn [OPTIONS] [PROG]... + +Arguments: + [PROG]... Instead of executing your shell, run PROG. For example: `wezterm + cli spawn -- bash -l` will spawn bash as if it were a login shell + +Options: + --pane-id + Specify the current pane. The default is to use the current pane based + on the environment variable WEZTERM_PANE. The pane is used to + determine the current domain and window + --domain-name + + --window-id + Specify the window into which to spawn a tab. If omitted, the window + associated with the current pane is used. Cannot be used with + `--workspace` or `--new-window` + --new-window + Spawn into a new window, rather than a new tab + --cwd + Specify the current working directory for the initially spawned + program + --workspace + When creating a new window, override the default workspace name with + the provided name. The default name is "default". Requires + `--new-window` + -h, --help + Print help diff --git a/docs/examples/cmd-synopsis-wezterm-cli-split-pane--help.txt b/docs/examples/cmd-synopsis-wezterm-cli-split-pane--help.txt new file mode 100644 index 000000000..31a2c71c9 --- /dev/null +++ b/docs/examples/cmd-synopsis-wezterm-cli-split-pane--help.txt @@ -0,0 +1,41 @@ +split the current pane. +Outputs the pane-id for the newly created pane on success + +Usage: wezterm cli split-pane [OPTIONS] [PROG]... + +Arguments: + [PROG]... Instead of executing your shell, run PROG. For example: `wezterm + cli split-pane -- bash -l` will spawn bash as if it were a login + shell + +Options: + --pane-id + Specify the pane that should be split. The default is to use the + current pane based on the environment variable WEZTERM_PANE + --horizontal + Equivalent to `--right`. If neither this nor any other direction is + specified, the default is equivalent to `--bottom` + --left + Split horizontally, with the new pane on the left + --right + Split horizontally, with the new pane on the right + --top + Split vertically, with the new pane on the top + --bottom + Split vertically, with the new pane on the bottom + --top-level + Rather than splitting the active pane, split the entire window + --cells + The number of cells that the new split should have. If omitted, 50% of + the available space is used + --percent + Specify the number of cells that the new split should have, expressed + as a percentage of the available space + --cwd + Specify the current working directory for the initially spawned + program + --move-pane-id + Instead of spawning a new command, move the specified pane into the + newly created split + -h, --help + Print help diff --git a/docs/examples/cmd-synopsis-wezterm-connect--help.txt b/docs/examples/cmd-synopsis-wezterm-connect--help.txt index c18c22fd9..47fc01363 100644 --- a/docs/examples/cmd-synopsis-wezterm-connect--help.txt +++ b/docs/examples/cmd-synopsis-wezterm-connect--help.txt @@ -1,4 +1,3 @@ - Connect to wezterm multiplexer Usage: wezterm connect [OPTIONS] [PROG]... diff --git a/docs/examples/cmd-synopsis-wezterm-imgcat--help.txt b/docs/examples/cmd-synopsis-wezterm-imgcat--help.txt index a3fed38b6..ffc3231a8 100644 --- a/docs/examples/cmd-synopsis-wezterm-imgcat--help.txt +++ b/docs/examples/cmd-synopsis-wezterm-imgcat--help.txt @@ -1,4 +1,3 @@ - Output an image to the terminal Usage: wezterm imgcat [OPTIONS] [FILE_NAME] diff --git a/docs/examples/cmd-synopsis-wezterm-ls-fonts--help.txt b/docs/examples/cmd-synopsis-wezterm-ls-fonts--help.txt index 731649351..fad6b6fca 100644 --- a/docs/examples/cmd-synopsis-wezterm-ls-fonts--help.txt +++ b/docs/examples/cmd-synopsis-wezterm-ls-fonts--help.txt @@ -1,4 +1,3 @@ - Display information about fonts Usage: wezterm ls-fonts [OPTIONS] diff --git a/docs/examples/cmd-synopsis-wezterm-record--help.txt b/docs/examples/cmd-synopsis-wezterm-record--help.txt index 67978c012..d99571c61 100644 --- a/docs/examples/cmd-synopsis-wezterm-record--help.txt +++ b/docs/examples/cmd-synopsis-wezterm-record--help.txt @@ -1,4 +1,3 @@ - Record a terminal session as an asciicast Usage: wezterm record [PROG]... diff --git a/docs/examples/cmd-synopsis-wezterm-replay--help.txt b/docs/examples/cmd-synopsis-wezterm-replay--help.txt index 79b0297e5..79f174de6 100644 --- a/docs/examples/cmd-synopsis-wezterm-replay--help.txt +++ b/docs/examples/cmd-synopsis-wezterm-replay--help.txt @@ -1,4 +1,3 @@ - Replay an asciicast terminal session Usage: wezterm replay [OPTIONS] diff --git a/docs/examples/cmd-synopsis-wezterm-serial--help.txt b/docs/examples/cmd-synopsis-wezterm-serial--help.txt index d49cb0e75..53cf7c703 100644 --- a/docs/examples/cmd-synopsis-wezterm-serial--help.txt +++ b/docs/examples/cmd-synopsis-wezterm-serial--help.txt @@ -1,4 +1,3 @@ - Open a serial port Usage: wezterm serial [OPTIONS] diff --git a/docs/examples/cmd-synopsis-wezterm-set-working-directory--help.txt b/docs/examples/cmd-synopsis-wezterm-set-working-directory--help.txt index 0c84343f1..bd79e7166 100644 --- a/docs/examples/cmd-synopsis-wezterm-set-working-directory--help.txt +++ b/docs/examples/cmd-synopsis-wezterm-set-working-directory--help.txt @@ -1,4 +1,3 @@ - Advise the terminal of the current working directory by emitting an OSC 7 escape sequence diff --git a/docs/examples/cmd-synopsis-wezterm-show-keys--help.txt b/docs/examples/cmd-synopsis-wezterm-show-keys--help.txt index 2a9778ee5..671c4abc5 100644 --- a/docs/examples/cmd-synopsis-wezterm-show-keys--help.txt +++ b/docs/examples/cmd-synopsis-wezterm-show-keys--help.txt @@ -1,4 +1,3 @@ - Show key assignments Usage: wezterm show-keys [OPTIONS] diff --git a/docs/examples/cmd-synopsis-wezterm-ssh--help.txt b/docs/examples/cmd-synopsis-wezterm-ssh--help.txt index c31fa7fbe..b734a1196 100644 --- a/docs/examples/cmd-synopsis-wezterm-ssh--help.txt +++ b/docs/examples/cmd-synopsis-wezterm-ssh--help.txt @@ -1,4 +1,3 @@ - Establish an ssh session Usage: wezterm ssh [OPTIONS] [PROG]... diff --git a/docs/examples/cmd-synopsis-wezterm-start--help.txt b/docs/examples/cmd-synopsis-wezterm-start--help.txt index 9048b8e4e..d1f172217 100644 --- a/docs/examples/cmd-synopsis-wezterm-start--help.txt +++ b/docs/examples/cmd-synopsis-wezterm-start--help.txt @@ -1,4 +1,3 @@ - Start the GUI, optionally running an alternative program Usage: wezterm start [OPTIONS] [PROG]...