mirror of
https://git.sr.ht/~leon_plickat/wlopm
synced 2024-11-16 02:18:25 +01:00
15 lines
352 B
Plaintext
15 lines
352 B
Plaintext
|
function __wlopm_completion ()
|
||
|
{
|
||
|
case "${COMP_WORDS[-2]}" in
|
||
|
"--on"|"--off"|"--toggle")
|
||
|
OPTS="$(wlopm | cut -d' ' -f1 | tr '\n' ' ')"
|
||
|
;;
|
||
|
|
||
|
*)
|
||
|
OPTS="-h --help -j --json -v --version --on --off --toggle"
|
||
|
;;
|
||
|
esac
|
||
|
COMPREPLY=($(compgen -W "${OPTS}" -- "${COMP_WORDS[${COMP_CWORD}]}"))
|
||
|
}
|
||
|
complete -F __wlopm_completion wlopm
|