File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments