Skip to content
This repository has been archived by the owner on Dec 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2 from DrStrangepork/master
Browse files Browse the repository at this point in the history
Now features interface of packer-1.4.3
  • Loading branch information
mrolli authored Aug 24, 2019
2 parents 4f1363d + f52427d commit 4080c31
Showing 1 changed file with 34 additions and 22 deletions.
56 changes: 34 additions & 22 deletions packer
Original file line number Diff line number Diff line change
Expand Up @@ -75,24 +75,28 @@ __packer_build ()
__packercomp "false true" "${cur##-color=}"
return
;;
-parallel=*)
__packercomp "false true" "${cur##-parallel=}"
return
;;
-except=*)
__packercomp "$builders" "${cur##-except=}"
return
;;
-on-error=*)
__packercomp "cleanup abort ask" "${cur##-on-error=}"
return
;;
-only=*)
__packercomp "$builders" "${cur##-only=}"
return
;;
-on-error=*)
__packercomp "cleanup abort ask" "${cur##-on-error=}"
-parallel-builds=*)
__packercomp "$builders" "${cur##-only=}"
return
;;
-parallel=*)
__packercomp "false true" "${cur##-parallel=}"
return
;;
-*)
__packercomp "-color= -debug -force -machine-readable -except= -only= -on-error= -parallel= -var -var-file="
__packercomp "-color= -debug -except= -force -machine-readable -on-error= -only= -parallel-builds= -parallel= -timestamp-ui -var -var-file="
return
;;
*)
Expand All @@ -101,16 +105,12 @@ __packer_build ()
__packercomp_template_file
}

# Generates completion for the fix command.
__packer_fix ()
# Generates completion for the console command.
__packer_console ()
{
case "$cur" in
-validate=*)
__packercomp "true false" "$#{cur##-validate=}"
return
;;
-*)
__packercomp "-validate="
__packercomp "-var -var-file="
return
;;
*)
Expand All @@ -119,12 +119,16 @@ __packer_fix ()
__packercomp_template_file
}

# Generates completion for the inspect command.
__packer_inspect ()
# Generates completion for the fix command.
__packer_fix ()
{
case "$cur" in
-validate=*)
__packercomp "true false" "$#{cur##-validate=}"
return
;;
-*)
__packercomp "-machine-readable"
__packercomp "-validate="
return
;;
*)
Expand All @@ -133,12 +137,12 @@ __packer_inspect ()
__packercomp_template_file
}

# Generates completion for the push command.
__packer_push ()
# Generates completion for the inspect command.
__packer_inspect ()
{
case "$cur" in
-*)
__packercomp "-name= -token= -var -var-file="
__packercomp "-machine-readable"
return
;;
*)
Expand All @@ -151,8 +155,16 @@ __packer_push ()
__packer_validate ()
{
case "$cur" in
-except=*)
__packercomp "$builders" "${cur##-except=}"
return
;;
-only=*)
__packercomp "$builders" "${cur##-only=}"
return
;;
-*)
__packercomp "-syntax-only -execpt= -only= -var -var-file="
__packercomp "-except= -only= -syntax-only -var -var-file="
return
;;
*)
Expand Down Expand Up @@ -192,7 +204,7 @@ _packer_completion ()
__packercomp "-machine-readable --help"
;;
*)
__packercomp "build fix inspect push validate version"
__packercomp "build console fix inspect validate version"
;;
esac
return
Expand Down

0 comments on commit 4080c31

Please sign in to comment.