@n42/cli 0.2.90 → 0.2.93

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,32 @@
1
+ _n42_completions()
2
+ {
3
+ local cur prev words cword
4
+ _init_completion || return
5
+
6
+ local commands="login logout apikey me usage clean history discover validate"
7
+
8
+ if [[ $cword -eq 1 ]]; then
9
+ COMPREPLY=( $(compgen -W "$commands" -- "$cur") )
10
+ return
11
+ fi
12
+
13
+ # discover peppol
14
+ if [[ ${words[1]} == "discover" && $cword -eq 2 ]]; then
15
+ COMPREPLY=( $(compgen -W "peppol" -- "$cur") )
16
+ return
17
+ fi
18
+
19
+ # validate peppol
20
+ if [[ ${words[1]} == "validate" && $cword -eq 2 ]]; then
21
+ COMPREPLY=( $(compgen -W "peppol" -- "$cur") )
22
+ return
23
+ fi
24
+
25
+ # usage discovery|validation|transactions
26
+ if [[ ${words[1]} == "usage" && $cword -eq 2 ]]; then
27
+ COMPREPLY=( $(compgen -W "discovery validation transactions" -- "$cur") )
28
+ return
29
+ fi
30
+ }
31
+
32
+ complete -F _n42_completions n42