mirror of
https://github.com/ohmybash/oh-my-bash.git
synced 2024-05-11 05:55:37 +00:00
completions/*: Fix quoting around _omb_util_function_exists
This commit is contained in:
@@ -552,7 +552,7 @@ _docker_compose() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
local completions_func=_docker_compose_${command//-/_}
|
local completions_func=_docker_compose_${command//-/_}
|
||||||
_omb_util_function_exists $completions_func && $completions_func
|
_omb_util_function_exists "$completions_func" && "$completions_func"
|
||||||
|
|
||||||
eval "$previous_extglob_setting"
|
eval "$previous_extglob_setting"
|
||||||
return 0
|
return 0
|
||||||
|
@@ -244,7 +244,7 @@ _docker_machine() {
|
|||||||
|
|
||||||
local completion_func=_docker_machine_"${command//-/_}"
|
local completion_func=_docker_machine_"${command//-/_}"
|
||||||
if _omb_util_function_exists "${completion_func}"; then
|
if _omb_util_function_exists "${completion_func}"; then
|
||||||
${completion_func}
|
"${completion_func}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
@@ -394,7 +394,7 @@ __docker_subcommands() {
|
|||||||
subcommand_pos=$counter
|
subcommand_pos=$counter
|
||||||
local subcommand=${words[$counter]}
|
local subcommand=${words[$counter]}
|
||||||
local completions_func=_docker_${command}_${subcommand}
|
local completions_func=_docker_${command}_${subcommand}
|
||||||
_omb_util_function_exists $completions_func && $completions_func
|
_omb_util_function_exists "$completions_func" && "$completions_func"
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -2953,7 +2953,7 @@ _docker() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
local completions_func=_docker_${command}
|
local completions_func=_docker_${command}
|
||||||
_omb_util_function_exists $completions_func && $completions_func
|
_omb_util_function_exists "$completions_func" && "$completions_func"
|
||||||
|
|
||||||
eval "$previous_extglob_setting"
|
eval "$previous_extglob_setting"
|
||||||
return 0
|
return 0
|
||||||
|
@@ -6,8 +6,8 @@
|
|||||||
|
|
||||||
function_exists()
|
function_exists()
|
||||||
{
|
{
|
||||||
_omb_util_function_exists $1
|
_omb_util_function_exists "$1"
|
||||||
return $?
|
return "$?"
|
||||||
}
|
}
|
||||||
|
|
||||||
function_exists _get_comp_words_by_ref ||
|
function_exists _get_comp_words_by_ref ||
|
||||||
|
@@ -133,7 +133,7 @@ _packer_completion ()
|
|||||||
_omb_util_function_exists _get_comp_words_by_ref && _get_comp_words_by_ref -n = cur
|
_omb_util_function_exists _get_comp_words_by_ref && _get_comp_words_by_ref -n = cur
|
||||||
|
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
local i c=1 command
|
local i c=1 command=
|
||||||
|
|
||||||
while [ $c -lt $COMP_CWORD ]; do
|
while [ $c -lt $COMP_CWORD ]; do
|
||||||
i="${COMP_WORDS[c]}"
|
i="${COMP_WORDS[c]}"
|
||||||
@@ -144,7 +144,7 @@ _packer_completion ()
|
|||||||
((c++))
|
((c++))
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -z $command ]; then
|
if [ -z "$command" ]; then
|
||||||
case "$cur" in
|
case "$cur" in
|
||||||
'-'*)
|
'-'*)
|
||||||
__packercomp "-machine-readable --help --version"
|
__packercomp "-machine-readable --help --version"
|
||||||
@@ -157,7 +157,7 @@ _packer_completion ()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
local completion_func="__packer_${command}"
|
local completion_func="__packer_${command}"
|
||||||
_omb_util_function_exists $completion_func && $completion_func
|
_omb_util_function_exists "$completion_func" && "$completion_func"
|
||||||
}
|
}
|
||||||
|
|
||||||
complete -o nospace -F _packer_completion packer
|
complete -o nospace -F _packer_completion packer
|
||||||
|
Reference in New Issue
Block a user