Skip to content

Commit 55c87dd

Browse files
committed
Add basic bash completions
1 parent 018e543 commit 55c87dd

File tree

1 file changed

+33
-0
lines changed
  • assets/completions/bash-completion/completions

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
_blobdrop() {
2+
local cur prev words cword split
3+
local opts="
4+
-h --help
5+
-v --version
6+
-f --frameless
7+
-k --keep
8+
-n --notification
9+
-p --persistent
10+
-t --ontop
11+
-x --auto-quit
12+
"
13+
_init_completion -s
14+
15+
case "$prev" in
16+
-x|--auto-quit)
17+
COMPREPLY=($(compgen -W '0 1 2' -- "$cur"))
18+
return
19+
;;
20+
esac
21+
22+
case "$cur" in
23+
-*)
24+
COMPREPLY=($(compgen -W "$opts" -- "$cur"))
25+
[[ ${COMPREPLY-} == *= ]] || compopt +o nospace
26+
;;
27+
*)
28+
COMPREPLY=($(compgen -f -- "$cur"))
29+
esac
30+
return 0
31+
}
32+
33+
complete -F _blobdrop -o bashdefault -o default blobdrop

0 commit comments

Comments
 (0)