Corrected a typo

Signed-off-by: Vangelis Tasoulas <vangelis@tasoulas.net>
pull/1179/head
Vangelis Tasoulas 2018-04-19 18:50:00 +02:00
parent 9efc944f19
commit 039a677bd8
No known key found for this signature in database
GPG Key ID: 15423A57A998DA61
1 changed files with 2 additions and 2 deletions

View File

@ -38,9 +38,9 @@ _terraform() {
elif [[ ${words[1]} != "--help" && ${words[1]} != "--version" && ${words[1]} != "version" ]] ; then elif [[ ${words[1]} != "--help" && ${words[1]} != "--version" && ${words[1]} != "version" ]] ; then
# Some commands acceps hyphened parameters,... # Some commands accept hyphened parameters, ...
opts="$(terraform --help "${words[1]}" | grep -P '^\s+-' | awk '{print $1}' | awk -F '=' '{ if ($0 ~ /=/) {print $1"="} else {print $1} }')" opts="$(terraform --help "${words[1]}" | grep -P '^\s+-' | awk '{print $1}' | awk -F '=' '{ if ($0 ~ /=/) {print $1"="} else {print $1} }')"
# but some other commands accept non hyphened parameters.... # but some other commands accept non-hyphened parameters.
opts="${opts} $(terraform --help "${words[1]}" | grep -P '^\s\s\s\s\S' | awk '{print $1}')" opts="${opts} $(terraform --help "${words[1]}" | grep -P '^\s\s\s\s\S' | awk '{print $1}')"
# All of the commands accept the --help parameter which is not listed # All of the commands accept the --help parameter which is not listed
# by the 'terraform --help <command> # by the 'terraform --help <command>