Skip to content

Commit

Permalink
docs and missing bit of #4535 #4523
Browse files Browse the repository at this point in the history
  • Loading branch information
wez committed Feb 3, 2024
1 parent beb29e8 commit 91749f7
Show file tree
Hide file tree
Showing 6 changed files with 130 additions and 15 deletions.
61 changes: 59 additions & 2 deletions assets/shell-completion/bash
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ _wezterm() {
",$1")
cmd="wezterm"
;;
wezterm,blocking-start)
cmd="wezterm__blocking__start"
;;
wezterm,cli)
cmd="wezterm__cli"
;;
Expand Down Expand Up @@ -171,6 +174,9 @@ _wezterm() {
wezterm__cli__help,zoom-pane)
cmd="wezterm__cli__help__zoom__pane"
;;
wezterm__help,blocking-start)
cmd="wezterm__help__blocking__start"
;;
wezterm__help,cli)
cmd="wezterm__help__cli"
;;
Expand Down Expand Up @@ -274,7 +280,7 @@ _wezterm() {

case "${cmd}" in
wezterm)
opts="-n -h -V --skip-config --config-file --config --help --version start ssh serial connect ls-fonts show-keys cli imgcat set-working-directory record replay shell-completion help"
opts="-n -h -V --skip-config --config-file --config --help --version start blocking-start ssh serial connect ls-fonts show-keys cli imgcat set-working-directory record replay shell-completion help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
Expand All @@ -298,6 +304,43 @@ _wezterm() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
wezterm__blocking__start)
opts="-e -h --no-auto-connect --always-new-process --new-tab --cwd --class --workspace --position --domain --attach --help [PROG]..."
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in
--cwd)
COMPREPLY=()
if [[ "${BASH_VERSINFO[0]}" -ge 4 ]]; then
compopt -o plusdirs
fi
return 0
;;
--class)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--workspace)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--position)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--domain)
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 get-text activate-pane-direction get-pane-direction kill-pane activate-pane adjust-pane-size activate-tab set-tab-title set-window-title rename-workspace zoom-pane help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
Expand Down Expand Up @@ -1053,7 +1096,7 @@ _wezterm() {
return 0
;;
wezterm__help)
opts="start ssh serial connect ls-fonts show-keys cli imgcat set-working-directory record replay shell-completion help"
opts="start blocking-start ssh serial connect ls-fonts show-keys cli imgcat set-working-directory record replay shell-completion help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
Expand All @@ -1066,6 +1109,20 @@ _wezterm() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
wezterm__help__blocking__start)
opts=""
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__help__cli)
opts="list list-clients proxy tlscreds move-pane-to-new-tab split-pane spawn send-text get-text activate-pane-direction get-pane-direction kill-pane activate-pane adjust-pane-size activate-tab set-tab-title set-window-title rename-workspace zoom-pane"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
Expand Down
Loading

0 comments on commit 91749f7

Please sign in to comment.