From de41af4df36193fb9df4b211243dc07b98156807 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 27 Sep 2013 19:20:08 -0300 Subject: Support git completion found also at /usr/share --- lib/keyringer/completions/bash/keyringer | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/keyringer/completions/bash/keyringer b/lib/keyringer/completions/bash/keyringer index 3d519c9..936e5e0 100644 --- a/lib/keyringer/completions/bash/keyringer +++ b/lib/keyringer/completions/bash/keyringer @@ -9,9 +9,17 @@ fi # Completion for git subcommand _keyringer_git_complete() { + local git_completion="" + if [ -e "/etc/bash_completion.d/git" ]; then + git_completion="/etc/bash_completion.d/git" + elif [ -e "/usr/share/bash-completion/completions/git" ]; then + git_completion="/usr/share/bash-completion/completions/git" + fi + + if [ ! -z "$git_completion" ]; then ( - source /etc/bash_completion.d/git + source $git_completion cd $path COMP_WORDS=(git $*) COMP_CWORD=$((${#COMP_WORDS[*]} - 1)) -- cgit v1.2.3