Skip to content

Commit

Permalink
Add bash completion
Browse files Browse the repository at this point in the history
  • Loading branch information
b1337xyz authored and fwsmit committed Sep 25, 2023
1 parent 3db9950 commit 2cd719a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions contrib/dunst.bashcomp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
_dunst() {
local opts cur prev split=false
_get_comp_words_by_ref cur prev
COMPREPLY=()
opts='-v -version --version -verbosity -conf -config -h --help'

case "$prev" in
-verbosity) COMPREPLY=("crit" "warn" "mesg" "info" "debug")
return ;;
-conf|--config) _filedir
return ;;
esac

case "$cur" in
*) COMPREPLY=( $( compgen -W "$opts" -- "$cur" ) ) ;;
esac
} && complete -F _dunst dunst

# ex: filetype=sh

0 comments on commit 2cd719a

Please sign in to comment.