summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/completion/git-completion.bash10
1 files changed, 9 insertions, 1 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index e74d50a4b9..97776fb31a 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1995,7 +1995,15 @@ __git_compute_config_vars ()
_git_config ()
{
- case "$prev" in
+ local varname
+
+ if [ "${BASH_VERSINFO[0]:-0}" -ge 4 ]; then
+ varname="${prev,,}"
+ else
+ varname="$(echo "$prev" |tr A-Z a-z)"
+ fi
+
+ case "$varname" in
branch.*.remote|branch.*.pushremote)
__gitcomp_nl "$(__git_remotes)"
return