aboutsummaryrefslogtreecommitdiff
path: root/extra/completions/alacritty.bash
diff options
context:
space:
mode:
Diffstat (limited to 'extra/completions/alacritty.bash')
-rw-r--r--extra/completions/alacritty.bash150
1 files changed, 136 insertions, 14 deletions
diff --git a/extra/completions/alacritty.bash b/extra/completions/alacritty.bash
index 60025f5f..bb70ef3f 100644
--- a/extra/completions/alacritty.bash
+++ b/extra/completions/alacritty.bash
@@ -1,5 +1,5 @@
_alacritty() {
- local i cur prev opts cmds
+ local i cur prev opts cmd
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
@@ -8,21 +8,45 @@ _alacritty() {
for i in ${COMP_WORDS[@]}
do
- case "${i}" in
- "$1")
+ case "${cmd},${i}" in
+ ",$1")
cmd="alacritty"
;;
- config)
- cmd+="__config"
+ alacritty,help)
+ cmd="alacritty__help"
;;
- create-window)
- cmd+="__create__window"
+ alacritty,msg)
+ cmd="alacritty__msg"
;;
- help)
- cmd+="__help"
+ alacritty__help,help)
+ cmd="alacritty__help__help"
;;
- msg)
- cmd+="__msg"
+ alacritty__help,msg)
+ cmd="alacritty__help__msg"
+ ;;
+ alacritty__help__msg,config)
+ cmd="alacritty__help__msg__config"
+ ;;
+ alacritty__help__msg,create-window)
+ cmd="alacritty__help__msg__create__window"
+ ;;
+ alacritty__msg,config)
+ cmd="alacritty__msg__config"
+ ;;
+ alacritty__msg,create-window)
+ cmd="alacritty__msg__create__window"
+ ;;
+ alacritty__msg,help)
+ cmd="alacritty__msg__help"
+ ;;
+ alacritty__msg__help,config)
+ cmd="alacritty__msg__help__config"
+ ;;
+ alacritty__msg__help,create-window)
+ cmd="alacritty__msg__help__create__window"
+ ;;
+ alacritty__msg__help,help)
+ cmd="alacritty__msg__help__help"
;;
*)
;;
@@ -31,7 +55,7 @@ _alacritty() {
case "${cmd}" in
alacritty)
- opts="-h -V -q -v -o -e -T --help --version --print-events --ref-test --embed --config-file --socket --option --working-directory --hold --command --title --class msg help"
+ opts="-q -v -o -e -T -h -V --print-events --ref-test --embed --config-file --socket --option --working-directory --hold --command --title --class --help --version msg help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
@@ -89,7 +113,7 @@ _alacritty() {
return 0
;;
alacritty__help)
- opts="<SUBCOMMAND>..."
+ opts="msg help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
@@ -102,6 +126,62 @@ _alacritty() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
+ alacritty__help__help)
+ 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
+ ;;
+ alacritty__help__msg)
+ opts="create-window config"
+ 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
+ ;;
+ alacritty__help__msg__config)
+ opts=""
+ if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
+ COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
+ return 0
+ fi
+ case "${prev}" in
+ *)
+ COMPREPLY=()
+ ;;
+ esac
+ COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
+ return 0
+ ;;
+ alacritty__help__msg__create__window)
+ opts=""
+ if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
+ COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
+ return 0
+ fi
+ case "${prev}" in
+ *)
+ COMPREPLY=()
+ ;;
+ esac
+ COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
+ return 0
+ ;;
alacritty__msg)
opts="-s -h --socket --help create-window config help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
@@ -185,7 +265,7 @@ _alacritty() {
return 0
;;
alacritty__msg__help)
- opts="<SUBCOMMAND>..."
+ opts="create-window config help"
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
@@ -198,6 +278,48 @@ _alacritty() {
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
;;
+ alacritty__msg__help__config)
+ opts=""
+ if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
+ COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
+ return 0
+ fi
+ case "${prev}" in
+ *)
+ COMPREPLY=()
+ ;;
+ esac
+ COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
+ return 0
+ ;;
+ alacritty__msg__help__create__window)
+ opts=""
+ if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
+ COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
+ return 0
+ fi
+ case "${prev}" in
+ *)
+ COMPREPLY=()
+ ;;
+ esac
+ COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
+ return 0
+ ;;
+ alacritty__msg__help__help)
+ opts=""
+ if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
+ COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
+ return 0
+ fi
+ case "${prev}" in
+ *)
+ COMPREPLY=()
+ ;;
+ esac
+ COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
+ return 0
+ ;;
esac
}