File tree Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ completion/available/minikube.completion.bash
79
79
completion/available/minishift.completion.bash
80
80
completion/available/ng.completion.bash
81
81
completion/available/ngrok.completion.bash
82
- # completion/available/notify-send.completion.bash
82
+ completion/available/notify-send.completion.bash
83
83
completion/available/npm.completion.bash
84
84
completion/available/nvm.completion.bash
85
85
completion/available/openshift.completion.bash
Original file line number Diff line number Diff line change 1
1
# shellcheck shell=bash
2
2
3
- function __notify-send_completions() {
4
- # shellcheck disable=SC2155
5
- local curr=$( _get_cword)
6
- # shellcheck disable=SC2155
7
- local prev=$( _get_pword)
3
+ # Make sure notify-send is installed
4
+ _bash-it-completion-helper-necessary notify-send || :
5
+
6
+ # Don't handle completion if it's already managed
7
+ _bash-it-completion-helper-sufficient notify-send || return
8
+
9
+ function _notify-send() {
10
+ local prev=" ${COMP_WORDS[COMP_CWORD - 1]} "
8
11
9
12
case $prev in
10
13
-u | --urgency)
11
- # shellcheck disable=SC2207
12
- COMPREPLY=($( compgen -W " low normal critical" -- " $curr " ) )
14
+ COMPREPLY=(" low" " normal" " critical" )
13
15
;;
14
16
* )
15
- # shellcheck disable=SC2207
16
- COMPREPLY=($( compgen -W " -? --help -u --urgency -t --expire-time -a --app-name -i --icon -c --category -h --hint -v --version" -- " $curr " ) )
17
+ COMPREPLY=(" -?" " --help" " -u" " --urgency" " -t" " --expire-time" " -a" " --app-name" " -i" " --icon" " -c" " --category" " -h" " --hint" " -v" " --version" )
17
18
;;
18
19
esac
19
20
}
20
21
21
- complete -F __notify-send_completions notify-send
22
+ complete -F _notify-send -X ' !&* ' notify-send
You can’t perform that action at this time.
0 commit comments