From cc9b59d795947aba600391f94a280d06fb9c99fc Mon Sep 17 00:00:00 2001 From: Gurkirat Singh Date: Sat, 16 Jan 2021 05:09:11 +0530 Subject: [PATCH] added completion for notify-send command --- .../available/notify-send.completion.bash | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 completion/available/notify-send.completion.bash diff --git a/completion/available/notify-send.completion.bash b/completion/available/notify-send.completion.bash new file mode 100644 index 00000000..e204d1c8 --- /dev/null +++ b/completion/available/notify-send.completion.bash @@ -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