Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
1442260c
Commit
1442260c
authored
May 27, 2015
by
Mitchell Hashimoto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2019 from alexshd/patch-1
contrib: zsh completion
parents
81996978
43f86180
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
0 deletions
+64
-0
contrib/zsh-completion/_packer
contrib/zsh-completion/_packer
+64
-0
No files found.
contrib/zsh-completion/_packer
0 → 100644
View file @
1442260c
#compdef packer
local -a _packer_cmds
_packer_cmds=(
'build:Build image(s) from template'
'fix:Fixes templates from old versions of packer'
'inspect:See components of a template'
'push:Push template files to a Packer build service'
'validate:Check that a template is valid'
'version:Prints the Packer version'
)
__build() {
_arguments \
'-debug[Debug mode enabled for builds]' \
'-force[Force a build to continue if artifacts exist, deletes existing artifacts]' \
'-machine-readable[Machine-readable output]' \
'-except=[(foo,bar,baz) Build all builds other than these]' \
'-only=[(foo,bar,baz) Only build the given builds by name]' \
'-parallel=[(false) Disable parallelization (on by default)]' \
'-var[("key=value") Variable for templates, can be used multiple times.]' \
'-var-file=[(path) JSON file containing user variables.]'
}
__inspect() {
_arguments \
'-machine-readable[Machine-readable output]'
}
__push() {
_arguments \
'-create[Create the build configuration if it does not exist].' \
'-token=[(<token>) Access token to use to upload.]'
}
__validate() {
_arguments \
'-syntax-only[Only check syntax. Do not verify config of the template.]' \
'-except=[(foo,bar,baz) Validate all builds other than these]' \
'-only=[(foo,bar,baz) Validate only these builds]' \
'-var[("key=value") Variable for templates, can be used multiple times.]' \
'-var-file=[(path) JSON file containing user variables.]'
}
_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 ;;
inspect)
__inspect ;;
push)
__push ;;
validate)
__validate ;;
esac
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment