Merge pull request #1788 from tbhaxor/lint/notify-send-completion
Lint/notify send completionpull/1835/head
commit
2d56cc4167
|
|
@ -79,6 +79,7 @@ completion/available/kontena.completion.bash
|
|||
completion/available/kubectl.completion.bash
|
||||
completion/available/lerna.completion.bash
|
||||
completion/available/minikube.completion.bash
|
||||
completion/available/notify-send.completion.bash
|
||||
completion/available/npm.completion.bash
|
||||
completion/available/packer.completion.bash
|
||||
completion/available/pip.completion.bash
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
# shellcheck shell=bash
|
||||
|
||||
function __notify-send_completions() {
|
||||
local curr=$(_get_cword)
|
||||
local prev=$(_get_pword)
|
||||
|
||||
case $prev in
|
||||
-u | --urgency)
|
||||
# shellcheck disable=SC2207
|
||||
COMPREPLY=($(compgen -W "low normal critical" -- "$curr"))
|
||||
;;
|
||||
*)
|
||||
# shellcheck disable=SC2207
|
||||
COMPREPLY=($(compgen -W "-? --help -u --urgency -t --expire-time -a --app-name -i --icon -c --category -h --hint -v --version" -- "$curr"))
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
complete -F __notify-send_completions notify-send
|
||||
Loading…
Reference in New Issue