From 20acfcac1aec9462b53d608279406de4296dd4cf Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Mon, 13 Mar 2023 00:05:27 +0900 Subject: [PATCH] completions/git: Use "_omb_util_glob_expand" --- completions/git.completion.bash | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/completions/git.completion.bash b/completions/git.completion.bash index ca9f9a4..cc1fd3c 100644 --- a/completions/git.completion.bash +++ b/completions/git.completion.bash @@ -13,8 +13,10 @@ function _omb_completion_git_initialize { # Note: In the case of symbolic link, the true binary name can # contain prefix or suffix for architectures and versions. path="${path%/*}" + local files + _omb_util_glob_expand files '"$prefix"/share/{bash-completion/completions/git,git-core/contrib/completion/git-completion.bash}' local prefix="${path%/bin}" file - for file in "$prefix"/share/{bash-completion/completions/git,git-core/contrib/completion/git-completion.bash}; do + for file in "${files[@]}"; do if [[ -f $file && -r $file && -s $file ]]; then source "$file" return $?