completions: Use only spaces in indent

Since both of tabs and spaces in indentation were used and
there were tabs expected 4 spaces width and 8 spaces width,
only spaces use in indentation.

Signed-off-by: ERAMOTO Masaya <eramoto.masaya@jp.fujitsu.com>
This commit is contained in:
ERAMOTO Masaya 2019-03-06 10:49:38 +09:00
parent 79de2d9f09
commit b434c8f424

View File

@ -17,9 +17,9 @@ _complete_() {
done done
case "$cur" in case "$cur" in
-*) -*)
COMPREPLY=( $( compgen -W "$boolean_options $options_with_args" -- "$cur" ) ) COMPREPLY=( $( compgen -W "$boolean_options $options_with_args" -- "$cur" ) )
;; ;;
*) *)
if [ -n "$transports" ] if [ -n "$transports" ]
then then
@ -84,7 +84,7 @@ _skopeo_inspect() {
_skopeo_standalone_sign() { _skopeo_standalone_sign() {
local options_with_args=" local options_with_args="
-o --output -o --output
" "
local boolean_options=" local boolean_options="
" "
@ -126,44 +126,44 @@ _skopeo_delete() {
_skopeo_layers() { _skopeo_layers() {
local options_with_args=" local options_with_args="
--creds --creds
--cert-dir --cert-dir
" "
local boolean_options=" local boolean_options="
--tls-verify --tls-verify
" "
_complete_ "$options_with_args" "$boolean_options" _complete_ "$options_with_args" "$boolean_options"
} }
_skopeo_skopeo() { _skopeo_skopeo() {
local options_with_args=" local options_with_args="
--policy --policy
--registries.d --registries.d
--override-arch --override-arch
--override-os --override-os
--command-timeout --command-timeout
" "
local boolean_options=" local boolean_options="
--insecure-policy --insecure-policy
--debug --debug
--version -v --version -v
--help -h --help -h
" "
commands=$( ${COMP_WORDS[@]:0:$COMP_CWORD} --generate-bash-completion ) commands=$( ${COMP_WORDS[@]:0:$COMP_CWORD} --generate-bash-completion )
case "$prev" in case "$prev" in
$main_options_with_args_glob ) $main_options_with_args_glob )
return return
;; ;;
esac esac
case "$cur" in case "$cur" in
-*) -*)
COMPREPLY=( $( compgen -W "$boolean_options $options_with_args" -- "$cur" ) ) COMPREPLY=( $( compgen -W "$boolean_options $options_with_args" -- "$cur" ) )
;; ;;
*) *)
COMPREPLY=( $( compgen -W "${commands[*]} help" -- "$cur" ) ) COMPREPLY=( $( compgen -W "${commands[*]} help" -- "$cur" ) )
;; ;;
esac esac
} }
@ -181,17 +181,17 @@ _cli_bash_autocomplete() {
local counter=1 local counter=1
counter=1 counter=1
while [ $counter -lt $cword ]; do while [ $counter -lt $cword ]; do
case "${words[$counter]}" in case "${words[$counter]}" in
-*) -*)
;; ;;
*) *)
command=$(echo "${words[$counter]}" | sed 's/-/_/g') command=$(echo "${words[$counter]}" | sed 's/-/_/g')
cpos=$counter cpos=$counter
(( cpos++ )) (( cpos++ ))
break break
;; ;;
esac esac
(( counter++ )) (( counter++ ))
done done
local completions_func=_skopeo_${command} local completions_func=_skopeo_${command}