2021-11-19 18:34:40 -05:00
|
|
|
_alacritty() {
|
|
|
|
local i cur prev opts cmds
|
2018-03-07 16:34:05 -05:00
|
|
|
COMPREPLY=()
|
|
|
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
|
|
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
2021-11-19 18:34:40 -05:00
|
|
|
cmd=""
|
|
|
|
opts=""
|
2018-03-07 16:34:05 -05:00
|
|
|
|
2021-11-19 18:34:40 -05:00
|
|
|
for i in ${COMP_WORDS[@]}
|
|
|
|
do
|
|
|
|
case "${i}" in
|
2022-01-04 13:25:26 -05:00
|
|
|
"$1")
|
2021-11-19 18:34:40 -05:00
|
|
|
cmd="alacritty"
|
|
|
|
;;
|
2022-08-31 18:48:38 -04:00
|
|
|
config)
|
|
|
|
cmd+="__config"
|
|
|
|
;;
|
2021-11-19 18:34:40 -05:00
|
|
|
create-window)
|
|
|
|
cmd+="__create__window"
|
|
|
|
;;
|
|
|
|
help)
|
|
|
|
cmd+="__help"
|
|
|
|
;;
|
|
|
|
msg)
|
|
|
|
cmd+="__msg"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
2018-03-07 16:34:05 -05:00
|
|
|
done
|
|
|
|
|
2021-11-19 18:34:40 -05:00
|
|
|
case "${cmd}" in
|
|
|
|
alacritty)
|
2022-12-10 19:54:06 -05:00
|
|
|
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"
|
2021-11-19 18:34:40 -05:00
|
|
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
|
|
|
|
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
|
|
|
return 0
|
|
|
|
fi
|
|
|
|
case "${prev}" in
|
2022-01-03 13:55:22 -05:00
|
|
|
--embed)
|
2021-11-19 18:34:40 -05:00
|
|
|
COMPREPLY=($(compgen -f "${cur}"))
|
|
|
|
return 0
|
|
|
|
;;
|
2022-01-03 13:55:22 -05:00
|
|
|
--config-file)
|
2021-11-19 18:34:40 -05:00
|
|
|
COMPREPLY=($(compgen -f "${cur}"))
|
|
|
|
return 0
|
|
|
|
;;
|
2022-01-03 13:55:22 -05:00
|
|
|
--socket)
|
2021-11-19 18:34:40 -05:00
|
|
|
COMPREPLY=($(compgen -f "${cur}"))
|
|
|
|
return 0
|
|
|
|
;;
|
2022-01-03 13:55:22 -05:00
|
|
|
--option)
|
2021-11-19 18:34:40 -05:00
|
|
|
COMPREPLY=($(compgen -f "${cur}"))
|
|
|
|
return 0
|
|
|
|
;;
|
2022-01-04 13:25:26 -05:00
|
|
|
-o)
|
2021-11-19 18:34:40 -05:00
|
|
|
COMPREPLY=($(compgen -f "${cur}"))
|
|
|
|
return 0
|
|
|
|
;;
|
2022-01-03 13:55:22 -05:00
|
|
|
--working-directory)
|
2021-11-19 18:34:40 -05:00
|
|
|
COMPREPLY=($(compgen -f "${cur}"))
|
|
|
|
return 0
|
|
|
|
;;
|
2022-01-03 13:55:22 -05:00
|
|
|
--command)
|
2021-11-19 18:34:40 -05:00
|
|
|
COMPREPLY=($(compgen -f "${cur}"))
|
|
|
|
return 0
|
|
|
|
;;
|
2022-01-04 13:25:26 -05:00
|
|
|
-e)
|
2021-11-19 18:34:40 -05:00
|
|
|
COMPREPLY=($(compgen -f "${cur}"))
|
|
|
|
return 0
|
|
|
|
;;
|
2022-01-03 13:55:22 -05:00
|
|
|
--title)
|
2021-11-19 18:34:40 -05:00
|
|
|
COMPREPLY=($(compgen -f "${cur}"))
|
|
|
|
return 0
|
|
|
|
;;
|
2022-12-10 19:54:06 -05:00
|
|
|
-T)
|
2021-11-19 18:34:40 -05:00
|
|
|
COMPREPLY=($(compgen -f "${cur}"))
|
|
|
|
return 0
|
|
|
|
;;
|
2022-01-03 13:55:22 -05:00
|
|
|
--class)
|
2021-11-19 18:34:40 -05:00
|
|
|
COMPREPLY=($(compgen -f "${cur}"))
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
COMPREPLY=()
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
alacritty__help)
|
2022-06-16 11:01:13 -04:00
|
|
|
opts="<SUBCOMMAND>..."
|
2021-11-19 18:34:40 -05:00
|
|
|
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
|
|
|
|
;;
|
|
|
|
alacritty__msg)
|
2022-08-31 18:48:38 -04:00
|
|
|
opts="-s -h --socket --help create-window config help"
|
2021-11-19 18:34:40 -05:00
|
|
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
|
|
|
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
|
|
|
return 0
|
|
|
|
fi
|
|
|
|
case "${prev}" in
|
|
|
|
--socket)
|
|
|
|
COMPREPLY=($(compgen -f "${cur}"))
|
|
|
|
return 0
|
|
|
|
;;
|
2022-01-04 13:25:26 -05:00
|
|
|
-s)
|
2021-11-19 18:34:40 -05:00
|
|
|
COMPREPLY=($(compgen -f "${cur}"))
|
|
|
|
return 0
|
|
|
|
;;
|
2022-08-31 18:48:38 -04:00
|
|
|
*)
|
|
|
|
COMPREPLY=()
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
alacritty__msg__config)
|
|
|
|
opts="-w -r -h --window-id --reset --help <CONFIG_OPTIONS>..."
|
|
|
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
|
|
|
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
|
|
|
return 0
|
|
|
|
fi
|
|
|
|
case "${prev}" in
|
|
|
|
--window-id)
|
|
|
|
COMPREPLY=($(compgen -f "${cur}"))
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
-w)
|
|
|
|
COMPREPLY=($(compgen -f "${cur}"))
|
|
|
|
return 0
|
|
|
|
;;
|
2021-11-19 18:34:40 -05:00
|
|
|
*)
|
|
|
|
COMPREPLY=()
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
alacritty__msg__create__window)
|
2022-12-10 19:54:06 -05:00
|
|
|
opts="-e -T -h --working-directory --hold --command --title --class --help"
|
2021-11-19 18:34:40 -05:00
|
|
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
|
|
|
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
|
|
|
return 0
|
|
|
|
fi
|
|
|
|
case "${prev}" in
|
2021-11-22 13:34:09 -05:00
|
|
|
--working-directory)
|
|
|
|
COMPREPLY=($(compgen -f "${cur}"))
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
--command)
|
|
|
|
COMPREPLY=($(compgen -f "${cur}"))
|
|
|
|
return 0
|
|
|
|
;;
|
2022-01-04 13:25:26 -05:00
|
|
|
-e)
|
2021-11-22 13:34:09 -05:00
|
|
|
COMPREPLY=($(compgen -f "${cur}"))
|
|
|
|
return 0
|
|
|
|
;;
|
2022-01-03 13:55:22 -05:00
|
|
|
--title)
|
|
|
|
COMPREPLY=($(compgen -f "${cur}"))
|
|
|
|
return 0
|
|
|
|
;;
|
2022-12-10 19:54:06 -05:00
|
|
|
-T)
|
2022-01-03 13:55:22 -05:00
|
|
|
COMPREPLY=($(compgen -f "${cur}"))
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
--class)
|
|
|
|
COMPREPLY=($(compgen -f "${cur}"))
|
|
|
|
return 0
|
|
|
|
;;
|
2021-11-19 18:34:40 -05:00
|
|
|
*)
|
|
|
|
COMPREPLY=()
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
alacritty__msg__help)
|
2022-06-16 11:01:13 -04:00
|
|
|
opts="<SUBCOMMAND>..."
|
2021-11-19 18:34:40 -05:00
|
|
|
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
|
|
|
|
;;
|
2018-03-07 16:34:05 -05:00
|
|
|
esac
|
|
|
|
}
|
2021-11-19 18:34:40 -05:00
|
|
|
|
|
|
|
complete -F _alacritty -o bashdefault -o default alacritty
|