summaryrefslogtreecommitdiffstats
path: root/conf.d/etc/bash_completion.d
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2018-03-06 16:47:13 +0100
committerSebastien Douheret <sebastien.douheret@iot.bzh>2018-03-06 16:47:13 +0100
commit04040c928142db92d2ef2d4b43ad4701392e5ceb (patch)
tree9d88a7087ff20bdb92c49476c5d46c6d2bdbd8a5 /conf.d/etc/bash_completion.d
parent1441d4c5806219c59fa1ae27c411a0fedb87a7c2 (diff)
Added bash completion support.
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'conf.d/etc/bash_completion.d')
-rw-r--r--conf.d/etc/bash_completion.d/xds-cli12
1 files changed, 12 insertions, 0 deletions
diff --git a/conf.d/etc/bash_completion.d/xds-cli b/conf.d/etc/bash_completion.d/xds-cli
new file mode 100644
index 0000000..9778180
--- /dev/null
+++ b/conf.d/etc/bash_completion.d/xds-cli
@@ -0,0 +1,12 @@
+#! /bin/bash
+
+_cli_bash_autocomplete() {
+ local cur opts base
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} --generate-bash-completion )
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ }
+
+complete -F _cli_bash_autocomplete xds-cli