File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ _dunst() {
55 opts=' -v -version --version -verbosity -conf -config -print --print -startup_notification --startup_notification -h -help --help'
66
77 case " $prev " in
8- -verbosity) COMPREPLY=(" crit" " warn" " mesg" " info" " debug" )
8+ -verbosity) COMPREPLY=( $( compgen -W ' crit warn mesg info debug' -- " $cur " ) )
99 return ;;
1010 -conf|--config) _filedir
1111 return ;;
Original file line number Diff line number Diff line change 11_dunstctl () {
2- local opts cur prev split=false
2+ local opts cur prev
33 _get_comp_words_by_ref cur prev
44 COMPREPLY=()
55 opts=' action close close-all context count debug help history history-clear history-pop history-rm is-paused rule rules set-paused'
66
77 case " $prev " in
8- count) COMPREPLY=(' displayed' ' history' ' waiting' )
8+ count) COMPREPLY=( $( compgen -W ' displayed history waiting' -- " $cur " ) )
99 return ;;
10- set-paused) COMPREPLY=(' true' ' false' ' toggle' )
10+ set-paused) COMPREPLY=( $( compgen -W ' true false toggle' -- " $cur " ) )
1111 return ;;
1212 history-pop|history-rm)
13- COMPREPLY=( $( dunstctl history | grep -A2 ' "id" :' |
14- awk ' /"data" :/{print $3}' | sort -u) )
13+ COMPREPLY=( $( compgen -W " $( dunstctl history | jq -r ' .data[][].id.data' ) " -- " $cur " ) )
1514 return ;;
1615 rule)
17- COMPREPLY=( $( compgen -W " $( dunstctl rules --json | jq -r ' .data[][].name.data' ) " -- $cur ) )
16+ COMPREPLY=( $( compgen -W " $( dunstctl rules --json | jq -r ' .data[][].name.data' ) " -- " $cur " ) )
1817 return ;;
1918 rules)
20- COMPREPLY=( $( compgen -W " --json" ) )
19+ COMPREPLY=( $( compgen -W " --json" -- " $cur " ) )
2120 return ;;
2221 esac
2322
2423 case " ${COMP_WORDS[1]} " in
25- rule) COMPREPLY=(' enabled ' ' disable' ' toggle' )
24+ rule) COMPREPLY=( $( compgen -W ' enable disable toggle' -- " $cur " ) )
2625 return ;;
2726 esac
2827
You can’t perform that action at this time.
0 commit comments