Skip to content

Commit 0bb7010

Browse files
committed
new completion script generated by chat gpt
1 parent 738008f commit 0bb7010

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

bash-completion/osmad_cli-prompt

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
_osmad_cli_completion() {
2+
local cur prev opts
3+
COMPREPLY=()
4+
cur="${COMP_WORDS[COMP_CWORD]}"
5+
prev="${COMP_WORDS[COMP_CWORD-1]}"
6+
opts="get list refresh watch update"
7+
8+
case "${prev}" in
9+
osmad_cli)
10+
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
11+
return 0
12+
;;
13+
get)
14+
local get_opts="-y --yes -u --url -d --decompress -f --filter --help"
15+
COMPREPLY=( $(compgen -W "${get_opts}" -- ${cur}) )
16+
return 0
17+
;;
18+
list)
19+
local list_opts="-c --cache -l --list -t --type -a --area -d --date -s --sort --help"
20+
COMPREPLY=( $(compgen -W "${list_opts}" -- ${cur}) )
21+
return 0
22+
;;
23+
watch)
24+
local watch_opts="-l --list -c --clear -a --add -d --del --help"
25+
COMPREPLY=( $(compgen -W "${watch_opts}" -- ${cur}) )
26+
return 0
27+
;;
28+
update)
29+
local update_opts="-s -n --help"
30+
COMPREPLY=( $(compgen -W "${update_opts}" -- ${cur}) )
31+
return 0
32+
;;
33+
*)
34+
;;
35+
esac
36+
}
37+
complete -F _osmad_cli_completion osmad_cli

0 commit comments

Comments
 (0)