Add bash completions

This commit is contained in:
Leon Henrik Plickat 2024-03-28 09:31:53 +01:00
commit cc037dc0f9
Failed to generate hash of commit
2 changed files with 26 additions and 1 deletions

23
bash-completion Normal file
View file

@ -0,0 +1,23 @@
function __wayneko_completion ()
{
case "${COMP_WORDS[-2]}" in
"--background-colour"|"--outline-colour"|"--idle-sleep"|"--sleepiness"|"--sleepiness-night")
return
;;
"--layer")
OPTS="background bottom top overlay"
;;
"--follow-pointer")
OPTS="true false"
;;
"--type")
OPTS="neko inu random"
;;
*)
OPTS="-h -? --help --background-colour --outline-colour --type --idle-sleep --sleepiness --sleepiness-night --layer --follow-pointer --survive-close"
;;
esac
COMPREPLY=($(compgen -W "${OPTS}" -- "${COMP_WORDS[${COMP_CWORD}]}"))
}
complete -F __wayneko_completion wayneko