代码拉取完成,页面将自动刷新
# DataKit completion -*- shell-script -*-
# We should copy this script to /etc/bash_completion.d/datakit for unbuntu
# For Centos relalted Linux, we need more test.
_datakit()
{
local cur_word prev_word
cur_word="${COMP_WORDS[COMP_CWORD]}"
prev_word="${COMP_WORDS[COMP_CWORD-1]}"
cmd=${COMP_WORDS[1]}
if [[ -n $cmd ]]; then # we have select specified command
case "${cmd}" in
dql)
COMPREPLY=( $(compgen -W '--auto-json --csv -F,--force --host -J,--json --log -R,--run -T,--token -V,--verbose' -- "${cur_word}") )
;;
pipeline)
COMPREPLY=( $(compgen -W '--date -F,--file --log --tab -T,--txt' -- "${cur_word}") )
;;
monitor)
COMPREPLY=( $(compgen -W '-I,--input --log -W,--max-table-width -R,--refresh --to -V,--verbose' -- "${cur_word}") )
;;
service)
COMPREPLY=( $(compgen -W '--log -I,--reinstall -R,--restart -S,--start -T,--stop -U,--uninstall' -- "${cur_word}") )
;;
install)
COMPREPLY=( $(compgen -W '--log --ipdb --log --scheck --telegraf' -- "${cur_word}") )
;;
tool)
COMPREPLY=( $(compgen -W '--default-main-conf --dump-samples --ipinfo --log
--show-cloud-info --upload-log --workspace-info --setup-completer-script' -- "${cur_word}") )
;;
help)
COMPREPLY=( $(compgen -W 'dql run pipeline service monitor install tool' -- "${cur_word}") )
;;
*)
COMPREPLY=( $(compgen -W 'dql run pipeline service monitor install tool help' -- "${cur_word}") )
;;
esac
else # command not selected
COMPREPLY=( $(compgen -W 'dql run pipeline service monitor install tool help' -- "${cur_word}") )
fi
} &&
complete -F _datakit datakit ddk
# ex: filetype=sh
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。