[zsh] fix buildah completion

This commit is contained in:
Julien Rabier 2021-02-12 16:52:53 +01:00
parent 7c3333e0c8
commit 62b6aef1c1

View File

@ -70,8 +70,8 @@ __buildah_pos_first_nonflag() {
# options immediately following their corresponding long form.
# This order should be applied to lists, alternatives and code blocks.
__buildah_previous_extglob_setting=$(shopt -p extglob)
shopt -s extglob
#__buildah_previous_extglob_setting=$(shopt -p extglob)
#setopt extended_glob
# __buildah_list_mounted
__buildah_list_mounted() {
@ -1145,8 +1145,8 @@ esac
}
_buildah() {
local previous_extglob_setting=$(shopt -p extglob)
shopt -s extglob
#local previous_extglob_setting=$(shopt -p extglob)
#shopt -s extglob
local commands=(
add
@ -1209,11 +1209,11 @@ done
local completions_func=_buildah_${command/-/_}
declare -F $completions_func >/dev/null && $completions_func
eval "$previous_extglob_setting"
#eval "$previous_extglob_setting"
return 0
}
eval "$__buildah_previous_extglob_setting"
unset __buildah_previous_extglob_setting
#eval "$__buildah_previous_extglob_setting"
#unset __buildah_previous_extglob_setting
complete -F _buildah buildah