added completion for notify-send command

pull/1787/head
Gurkirat Singh 2021-01-16 05:09:11 +05:30
parent 5e667ed476
commit cc9b59d795
No known key found for this signature in database
GPG Key ID: CFD64E1DCB3DA835
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
if _binary_exists notify-send
then
function __notify-send_completions ()
{
local curr=$(_get_cword)
local prev=$(_get_pword)
case $prev in
-u|--urgency)
COMPREPLY=($(compgen -W "low normal critical" -- "$curr"))
;;
*)
COMPREPLY=($(compgen -W "-? --help -u --urgency -t --expire-time -a --app-name -i --icon -c --category -h --hint -v --verison" -- "$curr"))
;;
esac
}
complete -F __notify-send_completions notify-send
fi