
* Added version command to swaync * Added version arg to client * Prints to stdout * Replaced GetServerInformation version with the generated one * Updated shell completions
41 lines
843 B
Plaintext
41 lines
843 B
Plaintext
_swaync() {
|
|
local cur prev
|
|
_get_comp_words_by_ref cur prev
|
|
|
|
short=(
|
|
-h
|
|
-v
|
|
-s
|
|
-c
|
|
)
|
|
|
|
long=(
|
|
--help
|
|
--version
|
|
--style
|
|
--config
|
|
)
|
|
case $prev in
|
|
-s | --style)
|
|
_filedir
|
|
return
|
|
;;
|
|
-c | --config)
|
|
_filedir
|
|
return
|
|
;;
|
|
esac
|
|
|
|
if [[ $cur == --* ]]; then
|
|
COMPREPLY=($(compgen -W "${long[*]}" -- "$cur"))
|
|
elif [[ $cur == -* ]]; then
|
|
COMPREPLY=($(compgen -W "${short[*]}" -- "$cur"))
|
|
COMPREPLY+=($(compgen -W "${long[*]}" -- "$cur"))
|
|
else
|
|
COMPREPLY=($(compgen -W "${short[*]}" -- "$cur"))
|
|
COMPREPLY+=($(compgen -W "${long[*]}" -- "$cur"))
|
|
COMPREPLY+=($(compgen -c -- "$cur"))
|
|
fi
|
|
|
|
} && complete -F _swaync swaync
|