mirror of
https://github.com/ohmybash/oh-my-bash.git
synced 2024-05-11 05:55:37 +00:00
completions/git: Return from the function instead of using a flag
Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
This commit is contained in:
committed by
Koichi Murase
parent
8fa9c34c43
commit
5516f7e2ed
@@ -1,7 +1,7 @@
|
||||
# bash completion support for Git.
|
||||
_omb_completion_git_initialize() {
|
||||
if ! _omb_util_function_exists __gitdir; then
|
||||
local is_completion_loaded=0 path
|
||||
local path
|
||||
for path in $(type -aP git);
|
||||
do
|
||||
path="${path%/git}"
|
||||
@@ -10,15 +10,12 @@ _omb_completion_git_initialize() {
|
||||
do
|
||||
local _file="$prefix/$file"
|
||||
if [[ -f $_file && -r $_file ]]; then
|
||||
is_completion_loaded=1
|
||||
source "$_file"
|
||||
break 2
|
||||
return
|
||||
fi
|
||||
done
|
||||
done
|
||||
if [[ $is_completion_loaded == 0 ]]; then
|
||||
source "$OSH/tools/git-completion.bash"
|
||||
fi
|
||||
source "$OSH/tools/git-completion.bash"
|
||||
fi
|
||||
}
|
||||
_omb_completion_git_initialize
|
||||
|
Reference in New Issue
Block a user