File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ completion/available/kubectl.completion.bash
84
84
completion/available/lerna.completion.bash
85
85
completion/available/minikube.completion.bash
86
86
completion/available/notify-send.completion.bash
87
+ completion/available/ngrok.completion.bash
87
88
completion/available/npm.completion.bash
88
89
completion/available/packer.completion.bash
89
90
completion/available/pip.completion.bash
Original file line number Diff line number Diff line change
1
+ # shellcheck shell=bash
2
+
3
+ __ngrok_completion () {
4
+ local prev=$( _get_pword)
5
+ local curr=$( _get_cword)
6
+
7
+ local BASE_NO_CONF=" --log --log-format --log-level --help"
8
+ local BASE=" --config $BASE_NO_CONF "
9
+ local DEFAULT=" $BASE --authtoken --region"
10
+
11
+ case $prev in
12
+ authtoken)
13
+ # shellcheck disable=SC2207
14
+ COMPREPLY=($( compgen -W " $BASE " -- " $curr " ) )
15
+ ;;
16
+ http)
17
+ # shellcheck disable=SC2207
18
+ COMPREPLY=($( compgen -W " $DEFAULT --auth --bind-tls --host-header --hostname --inspect --subdomain" -- " $curr " ) )
19
+ ;;
20
+ start)
21
+ # shellcheck disable=SC2207
22
+ COMPREPLY=($( compgen -W " $DEFAULT --all --none" -- " $curr " ) )
23
+ ;;
24
+ tcp)
25
+ # shellcheck disable=SC2207
26
+ COMPREPLY=($( compgen -W " $DEFAULT --remote-addr" -- " $curr " ) )
27
+ ;;
28
+ tls)
29
+ # shellcheck disable=SC2207
30
+ COMPREPLY=($( compgen -W " $DEFAULT --client-cas --crt --hostname --key --subdomain" -- " $curr " ) )
31
+ ;;
32
+ update)
33
+ # shellcheck disable=SC2207
34
+ COMPREPLY=($( compgen -W " $BASE_NO_CONF --channel" -- " $curr " ) )
35
+ ;;
36
+ ngrok)
37
+ # shellcheck disable=SC2207
38
+ COMPREPLY=($( compgen -W " authtoken credits http start tcp tls update version help" -- " $curr " ) )
39
+ ;;
40
+ * ) ;;
41
+
42
+ esac
43
+ }
44
+
45
+ complete -F __ngrok_completion ngrok
You can’t perform that action at this time.
0 commit comments