mirror of
https://git.sr.ht/~leon_plickat/wayneko
synced 2025-09-19 16:03:22 +02:00
Add bash completions
This commit is contained in:
parent
6536ec2ff3
commit
cc037dc0f9
2 changed files with 26 additions and 1 deletions
23
bash-completion
Normal file
23
bash-completion
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue