代码拉取完成,页面将自动刷新
#compdef packer
__json_template() {
declare -a template
template=($(ls | grep '.json'))
_describe 'images' template
}
local -a _packer_cmds
_packer_cmds=(
'build:Build commands.'
'fix:Repair templates from old versions of packer.'
'inspect:View template in human readable form.'
'push:Push to a remote packer host to build template.'
'validate:Check that a template is valid.'
'version:Display packer version.'
)
__build() {
_arguments \
'-debug[Enable Debug mode.]' \
'-force[Force a build delete existing artifacts.]' \
'-machine-readable[Enable machine-readable output.]' \
'-except=[Do not build specifed builds.]' \
'-only=[Build only specified builds.]' \
'-parallel=[Disable parallelization (default: true).]' \
'-var[Set variable in template.]' \
'-var-file=[Set JSON file containing user variables.]'
__json_template
}
__fix() {
__json_template
}
__inspect() {
_arguments \
'-machine-readable[Enable machine-readable output.]'
__json_template
}
__push() {
_arguments \
'-create[Create the build configuration if it does not exist.]' \
'-token=[Access token to use to upload. If blank, the ATLAS_TOKEN environmental variable will be used.]'
}
__validate() {
_arguments \
'-syntax-only[Check syntax only.]' \
'-except=[Do not validate specifed builds.]' \
'-only=[Validate only specified builds.]' \
'-var[Set variable in template.]' \
'-var-file=[Set JSON file containing user variables.]'
__json_template
}
__version() {
true
}
_arguments '*:: :->command'
if (( CURRENT == 1 )); then
_describe -t commands "packer command" _packer_cmds
return
fi
local -a _command_args
case "$words[1]" in
build)
__build ;;
fix)
__fix ;;
inspect)
__inspect ;;
push)
__push ;;
validate)
__validate ;;
version)
__version ;;
esac
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。