summaryrefslogtreecommitdiffstats
path: root/completions/influx
diff options
context:
space:
mode:
Diffstat (limited to 'completions/influx')
-rw-r--r--completions/influx21
1 files changed, 9 insertions, 12 deletions
diff --git a/completions/influx b/completions/influx
index e9362e7..89b90e7 100644
--- a/completions/influx
+++ b/completions/influx
@@ -1,35 +1,32 @@
# bash completion for influx(8) -*- shell-script -*-
-_influx()
+_comp_cmd_influx()
{
- local cur prev words cword
- _init_completion || return
+ local cur prev words cword comp_args
+ _comp_initialize -- "$@" || return
case $prev in
-version | -port | -database | -password | -username | -execute | -pps)
return
;;
-host)
- _known_hosts_real -- "$cur"
+ _comp_compgen_known_hosts -- "$cur"
return
;;
-format | -precision | -consistency)
- local args=$($1 --help 2>&1 | awk "\$1 == \"$prev\" { print \$2 }")
- COMPREPLY=($(
- IFS+="\"'|"
- compgen -W "$args" -- "$cur"
- ))
+ local args=$("$1" --help 2>&1 | _comp_awk "\$1 == \"$prev\" { print \$2 }")
+ _comp_compgen -F $' \t\n'"\"'|" -- -W "$args"
return
;;
-import | -path)
- _filedir
+ _comp_compgen_filedir
return
;;
esac
[[ $cur == -* ]] &&
- COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
+ _comp_compgen_help
} &&
- complete -F _influx influx
+ complete -F _comp_cmd_influx influx
# ex: filetype=sh