1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-23 13:21:38 +03:00

Install bash and zsh completions in rpm and deb packages

This commit is contained in:
Wez Furlong 2022-05-28 12:46:37 -07:00
parent 1df1390079
commit bc95d88227
6 changed files with 1027 additions and 0 deletions

View File

@ -0,0 +1,540 @@
_wezterm() {
local i cur prev opts cmds
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
cmd=""
opts=""
for i in ${COMP_WORDS[@]}
do
case "${i}" in
"$1")
cmd="wezterm"
;;
cli)
cmd+="__cli"
;;
connect)
cmd+="__connect"
;;
help)
cmd+="__help"
;;
imgcat)
cmd+="__imgcat"
;;
list)
cmd+="__list"
;;
list-clients)
cmd+="__list__clients"
;;
ls-fonts)
cmd+="__ls__fonts"
;;
move-pane-to-new-tab)
cmd+="__move__pane__to__new__tab"
;;
proxy)
cmd+="__proxy"
;;
record)
cmd+="__record"
;;
replay)
cmd+="__replay"
;;
send-text)
cmd+="__send__text"
;;
serial)
cmd+="__serial"
;;
set-working-directory)
cmd+="__set__working__directory"
;;
shell-completion)
cmd+="__shell__completion"
;;
spawn)
cmd+="__spawn"
;;
split-pane)
cmd+="__split__pane"
;;
ssh)
cmd+="__ssh"
;;
start)
cmd+="__start"
;;
tlscreds)
cmd+="__tlscreds"
;;
*)
;;
esac
done
case "${cmd}" in
wezterm)
opts="-h -V -n --help --version --config-file --config start ssh serial connect ls-fonts cli imgcat set-working-directory record replay shell-completion help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--config-file)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--config)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
wezterm__cli)
opts="-h --no-auto-start --prefer-mux --class --help list list-clients proxy tlscreds move-pane-to-new-tab split-pane spawn send-text help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--class)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
wezterm__cli__help)
opts="<SUBCOMMAND>..."
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
wezterm__cli__list)
opts="-h --format --help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--format)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
wezterm__cli__list__clients)
opts="-h --format --help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--format)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
wezterm__cli__move__pane__to__new__tab)
opts="-h --pane-id --window-id --new-window --workspace --help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--pane-id)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--window-id)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--workspace)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
wezterm__cli__proxy)
opts="-h --help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
wezterm__cli__send__text)
opts="-h --pane-id --no-paste --help <TEXT>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--pane-id)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
wezterm__cli__spawn)
opts="-h --pane-id --domain-name --window-id --new-window --cwd --workspace --help <PROG>..."
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--pane-id)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--domain-name)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--window-id)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--cwd)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--workspace)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
wezterm__cli__split__pane)
opts="-h --pane-id --horizontal --left --right --top --bottom --top-level --cells --percent --cwd --move-pane-id --help <PROG>..."
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--pane-id)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--cells)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--percent)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--cwd)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--move-pane-id)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
wezterm__cli__tlscreds)
opts="-h --help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
wezterm__connect)
opts="-h --class --workspace --position --help <DOMAIN_NAME> <PROG>..."
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--class)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--workspace)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--position)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
wezterm__help)
opts="<SUBCOMMAND>..."
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
wezterm__imgcat)
opts="-h --width --height --no-preserve-aspect-ratio --help <FILE_NAME>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--width)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--height)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
wezterm__ls__fonts)
opts="-h --list-system --text --help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--text)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
wezterm__record)
opts="-h --help <PROG>..."
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
wezterm__replay)
opts="-h --explain --help <CAST_FILE>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
wezterm__serial)
opts="-h --baud --class --position --help <PORT>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--baud)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--class)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--position)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
wezterm__set__working__directory)
opts="-h --help <CWD> <HOST>"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
wezterm__shell__completion)
opts="-h --shell --help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--shell)
COMPREPLY=($(compgen -W "bash elvish fish powershell zsh" -- "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
wezterm__ssh)
opts="-o -v -h --ssh-option --class --position --help <USER_AT_HOST_AND_PORT> <PROG>..."
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--ssh-option)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
-o)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--class)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--position)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
wezterm__start)
opts="-h --no-auto-connect --always-new-process --cwd --class --workspace --position --help <PROG>..."
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--cwd)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--class)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--workspace)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--position)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
*)
COMPREPLY=()
;;
esac
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
esac
}
complete -F _wezterm -o bashdefault -o default wezterm

View File

@ -0,0 +1,98 @@
complete -c wezterm -n "__fish_use_subcommand" -l config-file -d 'Specify the configuration file to use, overrides the normal configuration file resolution' -r
complete -c wezterm -n "__fish_use_subcommand" -l config -d 'Override specific configuration values' -r
complete -c wezterm -n "__fish_use_subcommand" -s h -l help -d 'Print help information'
complete -c wezterm -n "__fish_use_subcommand" -s V -l version -d 'Print version information'
complete -c wezterm -n "__fish_use_subcommand" -s n -d 'Skip loading wezterm.lua'
complete -c wezterm -n "__fish_use_subcommand" -f -a "start" -d 'Start the GUI, optionally running an alternative program'
complete -c wezterm -n "__fish_use_subcommand" -f -a "ssh" -d 'Establish an ssh session'
complete -c wezterm -n "__fish_use_subcommand" -f -a "serial" -d 'Open a serial port'
complete -c wezterm -n "__fish_use_subcommand" -f -a "connect" -d 'Connect to wezterm multiplexer'
complete -c wezterm -n "__fish_use_subcommand" -f -a "ls-fonts" -d 'Display information about fonts'
complete -c wezterm -n "__fish_use_subcommand" -f -a "cli" -d 'Interact with experimental mux server'
complete -c wezterm -n "__fish_use_subcommand" -f -a "imgcat" -d 'Output an image to the terminal'
complete -c wezterm -n "__fish_use_subcommand" -f -a "set-working-directory" -d 'Advise the terminal of the current working directory by emitting an OSC 7 escape sequence'
complete -c wezterm -n "__fish_use_subcommand" -f -a "record" -d 'Record a terminal session as an asciicast'
complete -c wezterm -n "__fish_use_subcommand" -f -a "replay" -d 'Replay an asciicast terminal session'
complete -c wezterm -n "__fish_use_subcommand" -f -a "shell-completion" -d 'Generate shell completion information'
complete -c wezterm -n "__fish_use_subcommand" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c wezterm -n "__fish_seen_subcommand_from start" -l cwd -d 'Specify the current working directory for the initially spawned program' -r
complete -c wezterm -n "__fish_seen_subcommand_from start" -l class -d 'Override the default windowing system class. The default is "org.wezfurlong.wezterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this instance of wezterm, including error, update and ssh authentication dialogs' -r
complete -c wezterm -n "__fish_seen_subcommand_from start" -l workspace -d 'Override the default workspace with the provided name. The default is "default"' -r
complete -c wezterm -n "__fish_seen_subcommand_from start" -l position -d 'Override the position for the initial window launched by this process.' -r
complete -c wezterm -n "__fish_seen_subcommand_from start" -l no-auto-connect -d 'If true, do not connect to domains marked as connect_automatically in your wezterm configuration file'
complete -c wezterm -n "__fish_seen_subcommand_from start" -l always-new-process -d 'If enabled, don\'t try to ask an existing wezterm GUI instance to start the command. Instead, always start the GUI in this invocation of wezterm so that you can wait for the command to complete by waiting for this wezterm process to finish'
complete -c wezterm -n "__fish_seen_subcommand_from start" -s h -l help -d 'Print help information'
complete -c wezterm -n "__fish_seen_subcommand_from ssh" -s o -l ssh-option -d 'Override specific SSH configuration options. `wezterm ssh` is able to parse some (but not all!) options from your `~/.ssh/config` and `/etc/ssh/ssh_config` files. This command line switch allows you to override or otherwise specify ssh_config style options' -r
complete -c wezterm -n "__fish_seen_subcommand_from ssh" -l class -d 'Override the default windowing system class. The default is "org.wezfurlong.wezterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this instance of wezterm, including error, update and ssh authentication dialogs' -r
complete -c wezterm -n "__fish_seen_subcommand_from ssh" -l position -d 'Override the position for the initial window launched by this process.' -r
complete -c wezterm -n "__fish_seen_subcommand_from ssh" -s v -d 'Enable verbose ssh protocol tracing. The trace information is printed to the stderr stream of the process'
complete -c wezterm -n "__fish_seen_subcommand_from ssh" -s h -l help -d 'Print help information'
complete -c wezterm -n "__fish_seen_subcommand_from serial" -l baud -d 'Set the baud rate. The default is 9600 baud' -r
complete -c wezterm -n "__fish_seen_subcommand_from serial" -l class -d 'Override the default windowing system class. The default is "org.wezfurlong.wezterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this instance of wezterm, including error, update and ssh authentication dialogs' -r
complete -c wezterm -n "__fish_seen_subcommand_from serial" -l position -d 'Override the position for the initial window launched by this process.' -r
complete -c wezterm -n "__fish_seen_subcommand_from serial" -s h -l help -d 'Print help information'
complete -c wezterm -n "__fish_seen_subcommand_from connect" -l class -d 'Override the default windowing system class. The default is "org.wezfurlong.wezterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this instance of wezterm, including error, update and ssh authentication dialogs' -r
complete -c wezterm -n "__fish_seen_subcommand_from connect" -l workspace -d 'Override the default workspace with the provided name. The default is "default"' -r
complete -c wezterm -n "__fish_seen_subcommand_from connect" -l position -d 'Override the position for the initial window launched by this process.' -r
complete -c wezterm -n "__fish_seen_subcommand_from connect" -s h -l help -d 'Print help information'
complete -c wezterm -n "__fish_seen_subcommand_from ls-fonts" -l text -d 'Explain which fonts are used to render the supplied text string' -r
complete -c wezterm -n "__fish_seen_subcommand_from ls-fonts" -l list-system -d 'Whether to list all fonts available to the system'
complete -c wezterm -n "__fish_seen_subcommand_from ls-fonts" -s h -l help -d 'Print help information'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and not __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from list-clients; and not __fish_seen_subcommand_from proxy; and not __fish_seen_subcommand_from tlscreds; and not __fish_seen_subcommand_from move-pane-to-new-tab; and not __fish_seen_subcommand_from split-pane; and not __fish_seen_subcommand_from spawn; and not __fish_seen_subcommand_from send-text; and not __fish_seen_subcommand_from help" -l class -d 'When connecting to a gui instance, if you started the gui with `--class SOMETHING`, you should also pass that same value here in order for the client to find the correct gui instance' -r
complete -c wezterm -n "__fish_seen_subcommand_from cli; and not __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from list-clients; and not __fish_seen_subcommand_from proxy; and not __fish_seen_subcommand_from tlscreds; and not __fish_seen_subcommand_from move-pane-to-new-tab; and not __fish_seen_subcommand_from split-pane; and not __fish_seen_subcommand_from spawn; and not __fish_seen_subcommand_from send-text; and not __fish_seen_subcommand_from help" -l no-auto-start -d 'Don\'t automatically start the server'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and not __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from list-clients; and not __fish_seen_subcommand_from proxy; and not __fish_seen_subcommand_from tlscreds; and not __fish_seen_subcommand_from move-pane-to-new-tab; and not __fish_seen_subcommand_from split-pane; and not __fish_seen_subcommand_from spawn; and not __fish_seen_subcommand_from send-text; and not __fish_seen_subcommand_from help" -l prefer-mux -d 'Prefer connecting to a background mux server. The default is to prefer connecting to a running wezterm gui instance'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and not __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from list-clients; and not __fish_seen_subcommand_from proxy; and not __fish_seen_subcommand_from tlscreds; and not __fish_seen_subcommand_from move-pane-to-new-tab; and not __fish_seen_subcommand_from split-pane; and not __fish_seen_subcommand_from spawn; and not __fish_seen_subcommand_from send-text; and not __fish_seen_subcommand_from help" -s h -l help -d 'Print help information'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and not __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from list-clients; and not __fish_seen_subcommand_from proxy; and not __fish_seen_subcommand_from tlscreds; and not __fish_seen_subcommand_from move-pane-to-new-tab; and not __fish_seen_subcommand_from split-pane; and not __fish_seen_subcommand_from spawn; and not __fish_seen_subcommand_from send-text; and not __fish_seen_subcommand_from help" -f -a "list" -d 'list windows, tabs and panes'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and not __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from list-clients; and not __fish_seen_subcommand_from proxy; and not __fish_seen_subcommand_from tlscreds; and not __fish_seen_subcommand_from move-pane-to-new-tab; and not __fish_seen_subcommand_from split-pane; and not __fish_seen_subcommand_from spawn; and not __fish_seen_subcommand_from send-text; and not __fish_seen_subcommand_from help" -f -a "list-clients" -d 'list clients'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and not __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from list-clients; and not __fish_seen_subcommand_from proxy; and not __fish_seen_subcommand_from tlscreds; and not __fish_seen_subcommand_from move-pane-to-new-tab; and not __fish_seen_subcommand_from split-pane; and not __fish_seen_subcommand_from spawn; and not __fish_seen_subcommand_from send-text; and not __fish_seen_subcommand_from help" -f -a "proxy" -d 'start rpc proxy pipe'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and not __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from list-clients; and not __fish_seen_subcommand_from proxy; and not __fish_seen_subcommand_from tlscreds; and not __fish_seen_subcommand_from move-pane-to-new-tab; and not __fish_seen_subcommand_from split-pane; and not __fish_seen_subcommand_from spawn; and not __fish_seen_subcommand_from send-text; and not __fish_seen_subcommand_from help" -f -a "tlscreds" -d 'obtain tls credentials'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and not __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from list-clients; and not __fish_seen_subcommand_from proxy; and not __fish_seen_subcommand_from tlscreds; and not __fish_seen_subcommand_from move-pane-to-new-tab; and not __fish_seen_subcommand_from split-pane; and not __fish_seen_subcommand_from spawn; and not __fish_seen_subcommand_from send-text; and not __fish_seen_subcommand_from help" -f -a "move-pane-to-new-tab" -d 'Move a pane into a new tab'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and not __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from list-clients; and not __fish_seen_subcommand_from proxy; and not __fish_seen_subcommand_from tlscreds; and not __fish_seen_subcommand_from move-pane-to-new-tab; and not __fish_seen_subcommand_from split-pane; and not __fish_seen_subcommand_from spawn; and not __fish_seen_subcommand_from send-text; and not __fish_seen_subcommand_from help" -f -a "split-pane" -d 'split the current pane.
Outputs the pane-id for the newly created pane on success'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and not __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from list-clients; and not __fish_seen_subcommand_from proxy; and not __fish_seen_subcommand_from tlscreds; and not __fish_seen_subcommand_from move-pane-to-new-tab; and not __fish_seen_subcommand_from split-pane; and not __fish_seen_subcommand_from spawn; and not __fish_seen_subcommand_from send-text; and not __fish_seen_subcommand_from help" -f -a "spawn" -d 'Spawn a command into a new window or tab
Outputs the pane-id for the newly created pane on success'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and not __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from list-clients; and not __fish_seen_subcommand_from proxy; and not __fish_seen_subcommand_from tlscreds; and not __fish_seen_subcommand_from move-pane-to-new-tab; and not __fish_seen_subcommand_from split-pane; and not __fish_seen_subcommand_from spawn; and not __fish_seen_subcommand_from send-text; and not __fish_seen_subcommand_from help" -f -a "send-text" -d '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'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and not __fish_seen_subcommand_from list; and not __fish_seen_subcommand_from list-clients; and not __fish_seen_subcommand_from proxy; and not __fish_seen_subcommand_from tlscreds; and not __fish_seen_subcommand_from move-pane-to-new-tab; and not __fish_seen_subcommand_from split-pane; and not __fish_seen_subcommand_from spawn; and not __fish_seen_subcommand_from send-text; and not __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from list" -l format -d 'Controls the output format. "table" and "json" are possible formats' -r
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from list" -s h -l help -d 'Print help information'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from list-clients" -l format -d 'Controls the output format. "table" and "json" are possible formats' -r
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from list-clients" -s h -l help -d 'Print help information'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from proxy" -s h -l help -d 'Print help information'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from tlscreds" -s h -l help -d 'Print help information'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from move-pane-to-new-tab" -l pane-id -d 'Specify the pane that should be moved. The default is to use the current pane based on the environment variable WEZTERM_PANE' -r
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from move-pane-to-new-tab" -l window-id -d 'Specify the window into which the new tab will be created. If omitted, the window associated with the current pane is used' -r
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from move-pane-to-new-tab" -l workspace -d 'If creating a new window, override the default workspace name with the provided name. The default name is "default"' -r
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from move-pane-to-new-tab" -l new-window -d 'Create tab in a new window, rather than the window currently containing the pane'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from move-pane-to-new-tab" -s h -l help -d 'Print help information'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from split-pane" -l pane-id -d 'Specify the pane that should be split. The default is to use the current pane based on the environment variable WEZTERM_PANE' -r
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from split-pane" -l cells -d 'The number of cells that the new split should have. If omitted, 50% of the available space is used' -r
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from split-pane" -l percent -d 'Specify the number of cells that the new split should have, expressed as a percentage of the available space' -r
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from split-pane" -l cwd -d 'Specify the current working directory for the initially spawned program' -r
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from split-pane" -l move-pane-id -d 'Instead of spawning a new command, move the specified pane into the newly created split' -r
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from split-pane" -l horizontal -d 'Equivalent to `--right`. If neither this nor any other direction is specified, the default is equivalent to `--bottom`'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from split-pane" -l left -d 'Split horizontally, with the new pane on the left'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from split-pane" -l right -d 'Split horizontally, with the new pane on the right'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from split-pane" -l top -d 'Split vertically, with the new pane on the top'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from split-pane" -l bottom -d 'Split vertically, with the new pane on the bottom'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from split-pane" -l top-level -d 'Rather than splitting the active pane, split the entire window'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from split-pane" -s h -l help -d 'Print help information'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from spawn" -l pane-id -d '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' -r
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from spawn" -l domain-name -r
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from spawn" -l window-id -d 'Specify the window into which to spawn a tab. If omitted, the window associated with the current pane is used' -r
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from spawn" -l cwd -d 'Specify the current working directory for the initially spawned program' -r
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from spawn" -l workspace -d 'When creating a new window, override the default workspace name with the provided name. The default name is "default"' -r
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from spawn" -l new-window -d 'Spawn into a new window, rather than a new tab'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from spawn" -s h -l help -d 'Print help information'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from send-text" -l pane-id -d 'Specify the target pane. The default is to use the current pane based on the environment variable WEZTERM_PANE' -r
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from send-text" -l no-paste -d 'Send the text directly, rather than as a bracketed paste'
complete -c wezterm -n "__fish_seen_subcommand_from cli; and __fish_seen_subcommand_from send-text" -s h -l help -d 'Print help information'
complete -c wezterm -n "__fish_seen_subcommand_from imgcat" -l width -d 'Specify the display width; defaults to "auto" which automatically selects an appropriate size. You may also use an integer value `N` to specify the number of cells, or `Npx` to specify the number of pixels, or `N%` to size relative to the terminal width' -r
complete -c wezterm -n "__fish_seen_subcommand_from imgcat" -l height -d 'Specify the display height; defaults to "auto" which automatically selects an appropriate size. You may also use an integer value `N` to specify the number of cells, or `Npx` to specify the number of pixels, or `N%` to size relative to the terminal height' -r
complete -c wezterm -n "__fish_seen_subcommand_from imgcat" -l no-preserve-aspect-ratio -d 'Do not respect the aspect ratio. The default is to respect the aspect ratio'
complete -c wezterm -n "__fish_seen_subcommand_from imgcat" -s h -l help -d 'Print help information'
complete -c wezterm -n "__fish_seen_subcommand_from set-working-directory" -s h -l help -d 'Print help information'
complete -c wezterm -n "__fish_seen_subcommand_from record" -s h -l help -d 'Print help information'
complete -c wezterm -n "__fish_seen_subcommand_from replay" -l explain -d 'Explain what is being sent/received'
complete -c wezterm -n "__fish_seen_subcommand_from replay" -s h -l help -d 'Print help information'
complete -c wezterm -n "__fish_seen_subcommand_from shell-completion" -l shell -d 'Which shell to generate for' -r -f -a "{bash ,elvish ,fish ,powershell ,zsh }"
complete -c wezterm -n "__fish_seen_subcommand_from shell-completion" -s h -l help -d 'Print help information'

377
assets/shell-completion/zsh Normal file
View File

@ -0,0 +1,377 @@
#compdef wezterm
autoload -U is-at-least
_wezterm() {
typeset -A opt_args
typeset -a _arguments_options
local ret=1
if is-at-least 5.2; then
_arguments_options=(-s -S -C)
else
_arguments_options=(-s -C)
fi
local context curcontext="$curcontext" state line
_arguments "${_arguments_options[@]}" \
'(-n)--config-file=[Specify the configuration file to use, overrides the normal configuration file resolution]:CONFIG_FILE: ' \
'*--config=[Override specific configuration values]:name=value: ' \
'-h[Print help information]' \
'--help[Print help information]' \
'-V[Print version information]' \
'--version[Print version information]' \
'-n[Skip loading wezterm.lua]' \
":: :_wezterm_commands" \
"*::: :->wezterm" \
&& ret=0
case $state in
(wezterm)
words=($line[1] "${words[@]}")
(( CURRENT += 1 ))
curcontext="${curcontext%:*:*}:wezterm-command-$line[1]:"
case $line[1] in
(start)
_arguments "${_arguments_options[@]}" \
'--cwd=[Specify the current working directory for the initially spawned program]:CWD: ' \
'--class=[Override the default windowing system class. The default is "org.wezfurlong.wezterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this instance of wezterm, including error, update and ssh authentication dialogs]:CLASS: ' \
'--workspace=[Override the default workspace with the provided name. The default is "default"]:WORKSPACE: ' \
'--position=[Override the position for the initial window launched by this process.]:POSITION: ' \
'--no-auto-connect[If true, do not connect to domains marked as connect_automatically in your wezterm configuration file]' \
'--always-new-process[If enabled, don'\''t try to ask an existing wezterm GUI instance to start the command. Instead, always start the GUI in this invocation of wezterm so that you can wait for the command to complete by waiting for this wezterm process to finish]' \
'-h[Print help information]' \
'--help[Print help information]' \
'*::prog -- Instead of executing your shell, run PROG. For example\: `wezterm start -- bash -l` will spawn bash as if it were a login shell:' \
&& ret=0
;;
(ssh)
_arguments "${_arguments_options[@]}" \
'*-o+[Override specific SSH configuration options. `wezterm ssh` is able to parse some (but not all!) options from your `~/.ssh/config` and `/etc/ssh/ssh_config` files. This command line switch allows you to override or otherwise specify ssh_config style options]:name=value: ' \
'*--ssh-option=[Override specific SSH configuration options. `wezterm ssh` is able to parse some (but not all!) options from your `~/.ssh/config` and `/etc/ssh/ssh_config` files. This command line switch allows you to override or otherwise specify ssh_config style options]:name=value: ' \
'--class=[Override the default windowing system class. The default is "org.wezfurlong.wezterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this instance of wezterm, including error, update and ssh authentication dialogs]:CLASS: ' \
'--position=[Override the position for the initial window launched by this process.]:POSITION: ' \
'-v[Enable verbose ssh protocol tracing. The trace information is printed to the stderr stream of the process]' \
'-h[Print help information]' \
'--help[Print help information]' \
':user-at-host-and-port -- Specifies the remote system using the form\: `\[username@\]host\[\:port\]`. If `username@` is omitted, then your local $USER is used instead. If `\:port` is omitted, then the standard ssh port (22) is used instead:' \
'*::prog -- Instead of executing your shell, run PROG. For example\: `wezterm ssh user@host -- bash -l` will spawn bash as if it were a login shell:' \
&& ret=0
;;
(serial)
_arguments "${_arguments_options[@]}" \
'--baud=[Set the baud rate. The default is 9600 baud]:BAUD: ' \
'--class=[Override the default windowing system class. The default is "org.wezfurlong.wezterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this instance of wezterm, including error, update and ssh authentication dialogs]:CLASS: ' \
'--position=[Override the position for the initial window launched by this process.]:POSITION: ' \
'-h[Print help information]' \
'--help[Print help information]' \
':port -- Specifies the serial device name. On Windows systems this can be a name like `COM0`. On posix systems this will be something like `/dev/ttyUSB0`:' \
&& ret=0
;;
(connect)
_arguments "${_arguments_options[@]}" \
'--class=[Override the default windowing system class. The default is "org.wezfurlong.wezterm". Under X11 and Windows this changes the window class. Under Wayland this changes the app_id. This changes the class for all windows spawned by this instance of wezterm, including error, update and ssh authentication dialogs]:CLASS: ' \
'--workspace=[Override the default workspace with the provided name. The default is "default"]:WORKSPACE: ' \
'--position=[Override the position for the initial window launched by this process.]:POSITION: ' \
'-h[Print help information]' \
'--help[Print help information]' \
':domain-name -- Name of the multiplexer domain section from the configuration to which you'\''d like to connect:' \
'*::prog -- Instead of executing your shell, run PROG. For example\: `wezterm start -- bash -l` will spawn bash as if it were a login shell:' \
&& ret=0
;;
(ls-fonts)
_arguments "${_arguments_options[@]}" \
'(--list-system)--text=[Explain which fonts are used to render the supplied text string]:TEXT: ' \
'--list-system[Whether to list all fonts available to the system]' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(cli)
_arguments "${_arguments_options[@]}" \
'--class=[When connecting to a gui instance, if you started the gui with `--class SOMETHING`, you should also pass that same value here in order for the client to find the correct gui instance]:CLASS: ' \
'--no-auto-start[Don'\''t automatically start the server]' \
'--prefer-mux[Prefer connecting to a background mux server. The default is to prefer connecting to a running wezterm gui instance]' \
'-h[Print help information]' \
'--help[Print help information]' \
":: :_wezterm__cli_commands" \
"*::: :->cli" \
&& ret=0
case $state in
(cli)
words=($line[1] "${words[@]}")
(( CURRENT += 1 ))
curcontext="${curcontext%:*:*}:wezterm-cli-command-$line[1]:"
case $line[1] in
(list)
_arguments "${_arguments_options[@]}" \
'--format=[Controls the output format. "table" and "json" are possible formats]:FORMAT: ' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(list-clients)
_arguments "${_arguments_options[@]}" \
'--format=[Controls the output format. "table" and "json" are possible formats]:FORMAT: ' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(proxy)
_arguments "${_arguments_options[@]}" \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(tlscreds)
_arguments "${_arguments_options[@]}" \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(move-pane-to-new-tab)
_arguments "${_arguments_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]:PANE_ID: ' \
'--window-id=[Specify the window into which the new tab will be created. If omitted, the window associated with the current pane is used]:WINDOW_ID: ' \
'--workspace=[If creating a new window, override the default workspace name with the provided name. The default name is "default"]:WORKSPACE: ' \
'(--window-id)--new-window[Create tab in a new window, rather than the window currently containing the pane]' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(split-pane)
_arguments "${_arguments_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]:PANE_ID: ' \
'--cells=[The number of cells that the new split should have. If omitted, 50% of the available space is used]:CELLS: ' \
'(--cells)--percent=[Specify the number of cells that the new split should have, expressed as a percentage of the available space]:PERCENT: ' \
'--cwd=[Specify the current working directory for the initially spawned program]:CWD: ' \
'(--cwd)--move-pane-id=[Instead of spawning a new command, move the specified pane into the newly created split]:MOVE_PANE_ID: ' \
'(--left --right --top --bottom)--horizontal[Equivalent to `--right`. If neither this nor any other direction is specified, the default is equivalent to `--bottom`]' \
'(--right --top --bottom)--left[Split horizontally, with the new pane on the left]' \
'(--left --top --bottom)--right[Split horizontally, with the new pane on the right]' \
'(--left --right --bottom)--top[Split vertically, with the new pane on the top]' \
'(--left --right --top)--bottom[Split vertically, with the new pane on the bottom]' \
'--top-level[Rather than splitting the active pane, split the entire window]' \
'-h[Print help information]' \
'--help[Print help information]' \
'*::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:' \
&& ret=0
;;
(spawn)
_arguments "${_arguments_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]:PANE_ID: ' \
'--domain-name=[]:DOMAIN_NAME: ' \
'--window-id=[Specify the window into which to spawn a tab. If omitted, the window associated with the current pane is used]:WINDOW_ID: ' \
'--cwd=[Specify the current working directory for the initially spawned program]:CWD: ' \
'--workspace=[When creating a new window, override the default workspace name with the provided name. The default name is "default"]:WORKSPACE: ' \
'(--window-id)--new-window[Spawn into a new window, rather than a new tab]' \
'-h[Print help information]' \
'--help[Print help information]' \
'*::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:' \
&& ret=0
;;
(send-text)
_arguments "${_arguments_options[@]}" \
'--pane-id=[Specify the target pane. The default is to use the current pane based on the environment variable WEZTERM_PANE]:PANE_ID: ' \
'--no-paste[Send the text directly, rather than as a bracketed paste]' \
'-h[Print help information]' \
'--help[Print help information]' \
'::text -- The text to send. If omitted, will read the text from stdin:' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'*::subcommand -- The subcommand whose help message to display:' \
&& ret=0
;;
esac
;;
esac
;;
(imgcat)
_arguments "${_arguments_options[@]}" \
'--width=[Specify the display width; defaults to "auto" which automatically selects an appropriate size. You may also use an integer value `N` to specify the number of cells, or `Npx` to specify the number of pixels, or `N%` to size relative to the terminal width]:WIDTH: ' \
'--height=[Specify the display height; defaults to "auto" which automatically selects an appropriate size. You may also use an integer value `N` to specify the number of cells, or `Npx` to specify the number of pixels, or `N%` to size relative to the terminal height]:HEIGHT: ' \
'--no-preserve-aspect-ratio[Do not respect the aspect ratio. The default is to respect the aspect ratio]' \
'-h[Print help information]' \
'--help[Print help information]' \
'::file-name -- The name of the image file to be displayed. If omitted, will attempt to read it from stdin:' \
&& ret=0
;;
(set-working-directory)
_arguments "${_arguments_options[@]}" \
'-h[Print help information]' \
'--help[Print help information]' \
'::cwd -- The directory to specify. If omitted, will use the current directory of the process itself:' \
'::host -- The hostname to use in the constructed file\:// URL. If omitted, the system hostname will be used:' \
&& ret=0
;;
(record)
_arguments "${_arguments_options[@]}" \
'-h[Print help information]' \
'--help[Print help information]' \
'*::prog:' \
&& ret=0
;;
(replay)
_arguments "${_arguments_options[@]}" \
'--explain[Explain what is being sent/received]' \
'-h[Print help information]' \
'--help[Print help information]' \
':cast-file:' \
&& ret=0
;;
(shell-completion)
_arguments "${_arguments_options[@]}" \
'--shell=[Which shell to generate for]:SHELL:(bash elvish fish powershell zsh)' \
'-h[Print help information]' \
'--help[Print help information]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'*::subcommand -- The subcommand whose help message to display:' \
&& ret=0
;;
esac
;;
esac
}
(( $+functions[_wezterm_commands] )) ||
_wezterm_commands() {
local commands; commands=(
'start:Start the GUI, optionally running an alternative program' \
'ssh:Establish an ssh session' \
'serial:Open a serial port' \
'connect:Connect to wezterm multiplexer' \
'ls-fonts:Display information about fonts' \
'cli:Interact with experimental mux server' \
'imgcat:Output an image to the terminal' \
'set-working-directory:Advise the terminal of the current working directory by emitting an OSC 7 escape sequence' \
'record:Record a terminal session as an asciicast' \
'replay:Replay an asciicast terminal session' \
'shell-completion:Generate shell completion information' \
'help:Print this message or the help of the given subcommand(s)' \
)
_describe -t commands 'wezterm commands' commands "$@"
}
(( $+functions[_wezterm__cli_commands] )) ||
_wezterm__cli_commands() {
local commands; commands=(
'list:list windows, tabs and panes' \
'list-clients:list clients' \
'proxy:start rpc proxy pipe' \
'tlscreds:obtain tls credentials' \
'move-pane-to-new-tab:Move a pane into a new tab' \
'split-pane:split the current pane.
Outputs the pane-id for the newly created pane on success' \
'spawn:Spawn a command into a new window or tab
Outputs the pane-id for the newly created pane on success' \
'send-text: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' \
'help:Print this message or the help of the given subcommand(s)' \
)
_describe -t commands 'wezterm cli commands' commands "$@"
}
(( $+functions[_wezterm__connect_commands] )) ||
_wezterm__connect_commands() {
local commands; commands=()
_describe -t commands 'wezterm connect commands' commands "$@"
}
(( $+functions[_wezterm__cli__help_commands] )) ||
_wezterm__cli__help_commands() {
local commands; commands=()
_describe -t commands 'wezterm cli help commands' commands "$@"
}
(( $+functions[_wezterm__help_commands] )) ||
_wezterm__help_commands() {
local commands; commands=()
_describe -t commands 'wezterm help commands' commands "$@"
}
(( $+functions[_wezterm__imgcat_commands] )) ||
_wezterm__imgcat_commands() {
local commands; commands=()
_describe -t commands 'wezterm imgcat commands' commands "$@"
}
(( $+functions[_wezterm__cli__list_commands] )) ||
_wezterm__cli__list_commands() {
local commands; commands=()
_describe -t commands 'wezterm cli list commands' commands "$@"
}
(( $+functions[_wezterm__cli__list-clients_commands] )) ||
_wezterm__cli__list-clients_commands() {
local commands; commands=()
_describe -t commands 'wezterm cli list-clients commands' commands "$@"
}
(( $+functions[_wezterm__ls-fonts_commands] )) ||
_wezterm__ls-fonts_commands() {
local commands; commands=()
_describe -t commands 'wezterm ls-fonts commands' commands "$@"
}
(( $+functions[_wezterm__cli__move-pane-to-new-tab_commands] )) ||
_wezterm__cli__move-pane-to-new-tab_commands() {
local commands; commands=()
_describe -t commands 'wezterm cli move-pane-to-new-tab commands' commands "$@"
}
(( $+functions[_wezterm__cli__proxy_commands] )) ||
_wezterm__cli__proxy_commands() {
local commands; commands=()
_describe -t commands 'wezterm cli proxy commands' commands "$@"
}
(( $+functions[_wezterm__record_commands] )) ||
_wezterm__record_commands() {
local commands; commands=()
_describe -t commands 'wezterm record commands' commands "$@"
}
(( $+functions[_wezterm__replay_commands] )) ||
_wezterm__replay_commands() {
local commands; commands=()
_describe -t commands 'wezterm replay commands' commands "$@"
}
(( $+functions[_wezterm__cli__send-text_commands] )) ||
_wezterm__cli__send-text_commands() {
local commands; commands=()
_describe -t commands 'wezterm cli send-text commands' commands "$@"
}
(( $+functions[_wezterm__serial_commands] )) ||
_wezterm__serial_commands() {
local commands; commands=()
_describe -t commands 'wezterm serial commands' commands "$@"
}
(( $+functions[_wezterm__set-working-directory_commands] )) ||
_wezterm__set-working-directory_commands() {
local commands; commands=()
_describe -t commands 'wezterm set-working-directory commands' commands "$@"
}
(( $+functions[_wezterm__shell-completion_commands] )) ||
_wezterm__shell-completion_commands() {
local commands; commands=()
_describe -t commands 'wezterm shell-completion commands' commands "$@"
}
(( $+functions[_wezterm__cli__spawn_commands] )) ||
_wezterm__cli__spawn_commands() {
local commands; commands=()
_describe -t commands 'wezterm cli spawn commands' commands "$@"
}
(( $+functions[_wezterm__cli__split-pane_commands] )) ||
_wezterm__cli__split-pane_commands() {
local commands; commands=()
_describe -t commands 'wezterm cli split-pane commands' commands "$@"
}
(( $+functions[_wezterm__ssh_commands] )) ||
_wezterm__ssh_commands() {
local commands; commands=()
_describe -t commands 'wezterm ssh commands' commands "$@"
}
(( $+functions[_wezterm__start_commands] )) ||
_wezterm__start_commands() {
local commands; commands=()
_describe -t commands 'wezterm start commands' commands "$@"
}
(( $+functions[_wezterm__cli__tlscreds_commands] )) ||
_wezterm__cli__tlscreds_commands() {
local commands; commands=()
_describe -t commands 'wezterm cli tlscreds commands' commands "$@"
}
_wezterm "$@"

View File

@ -161,6 +161,8 @@ install -Dsm755 target/release/wezterm-mux-server -t %{buildroot}/usr/bin
install -Dsm755 target/release/wezterm-gui -t %{buildroot}/usr/bin install -Dsm755 target/release/wezterm-gui -t %{buildroot}/usr/bin
install -Dsm755 target/release/strip-ansi-escapes -t %{buildroot}/usr/bin install -Dsm755 target/release/strip-ansi-escapes -t %{buildroot}/usr/bin
install -Dm644 assets/shell-integration/* -t %{buildroot}/etc/profile.d install -Dm644 assets/shell-integration/* -t %{buildroot}/etc/profile.d
install -Dm644 assets/shell-completion/zsh %{buildroot}/usr/share/zsh/site-functions/_wezterm
install -Dm644 assets/shell-completion/bash %{buildroot}/etc/bash_completion.d/wezterm
install -Dm644 assets/icon/terminal.png %{buildroot}/usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png install -Dm644 assets/icon/terminal.png %{buildroot}/usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png
install -Dm644 assets/wezterm.desktop %{buildroot}/usr/share/applications/org.wezfurlong.wezterm.desktop install -Dm644 assets/wezterm.desktop %{buildroot}/usr/share/applications/org.wezfurlong.wezterm.desktop
install -Dm644 assets/wezterm.appdata.xml %{buildroot}/usr/share/metainfo/org.wezfurlong.wezterm.appdata.xml install -Dm644 assets/wezterm.appdata.xml %{buildroot}/usr/share/metainfo/org.wezfurlong.wezterm.appdata.xml
@ -171,6 +173,8 @@ install -Dm644 assets/wezterm-nautilus.py %{buildroot}/usr/share/nautilus-python
/usr/bin/wezterm-gui /usr/bin/wezterm-gui
/usr/bin/wezterm-mux-server /usr/bin/wezterm-mux-server
/usr/bin/strip-ansi-escapes /usr/bin/strip-ansi-escapes
/usr/share/zsh/site-functions/_wezterm
/etc/bash_completion.d/wezterm
/usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png /usr/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png
/usr/share/applications/org.wezfurlong.wezterm.desktop /usr/share/applications/org.wezfurlong.wezterm.desktop
/usr/share/metainfo/org.wezfurlong.wezterm.appdata.xml /usr/share/metainfo/org.wezfurlong.wezterm.appdata.xml
@ -234,6 +238,8 @@ EOF
install -Dm644 assets/wezterm.desktop pkg/debian/usr/share/applications/org.wezfurlong.wezterm.desktop install -Dm644 assets/wezterm.desktop pkg/debian/usr/share/applications/org.wezfurlong.wezterm.desktop
install -Dm644 assets/wezterm.appdata.xml pkg/debian/usr/share/metainfo/org.wezfurlong.wezterm.appdata.xml install -Dm644 assets/wezterm.appdata.xml pkg/debian/usr/share/metainfo/org.wezfurlong.wezterm.appdata.xml
install -Dm644 assets/wezterm-nautilus.py pkg/debian/usr/share/nautilus-python/extensions/wezterm-nautilus.py install -Dm644 assets/wezterm-nautilus.py pkg/debian/usr/share/nautilus-python/extensions/wezterm-nautilus.py
install -Dm644 assets/shell-completion/bash pkg/debian/usr/share/bash-completion/bash_completion
install -Dm644 assets/shell-completion/zsh pkg/debian/usr/share/zsh/functions/Completion/Unix/_wezterm
install -Dm644 assets/shell-integration/* -t pkg/debian/etc/profile.d install -Dm644 assets/shell-integration/* -t pkg/debian/etc/profile.d
if [[ "$BUILD_REASON" == "Schedule" ]] ; then if [[ "$BUILD_REASON" == "Schedule" ]] ; then
debname=wezterm-nightly.$distro$distver debname=wezterm-nightly.$distro$distver

5
ci/update-completions.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
for shell in bash zsh fish ; do
target/debug/wezterm shell-completion --shell $shell > assets/shell-completion/$shell
done

View File

@ -41,6 +41,7 @@ As features stabilize some brief notes about them will accumulate here.
* `wezterm cli send-text --no-paste` option to send text to a pain without wrapping it as a bracketed paste * `wezterm cli send-text --no-paste` option to send text to a pain without wrapping it as a bracketed paste
* [PaneSelect](config/lua/keyassignment/PaneSelect.md) key assignment to activate the pane selection UI to activate or swap the selected pane. [#1842](https://github.com/wez/wezterm/issues/1842) [#1975](https://github.com/wez/wezterm/issues/1975) * [PaneSelect](config/lua/keyassignment/PaneSelect.md) key assignment to activate the pane selection UI to activate or swap the selected pane. [#1842](https://github.com/wez/wezterm/issues/1842) [#1975](https://github.com/wez/wezterm/issues/1975)
* [window_background_gradient](config/lua/config/window_background_gradient.md) now also supports `Linear` gradients with an angle of your choice. Thanks to [@erf](https://github.com/erf)! [#2038](https://github.com/wez/wezterm/pull/2038) * [window_background_gradient](config/lua/config/window_background_gradient.md) now also supports `Linear` gradients with an angle of your choice. Thanks to [@erf](https://github.com/erf)! [#2038](https://github.com/wez/wezterm/pull/2038)
* RPM and DEB packages now install zsh and bash `wezterm` CLI completions
#### Updated #### Updated
* Bundled harfbuzz to 4.3.0 * Bundled harfbuzz to 4.3.0