diff options
Diffstat (limited to 'bash/bash_completion.d/git.bash')
-rw-r--r-- | bash/bash_completion.d/git.bash | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bash/bash_completion.d/git.bash b/bash/bash_completion.d/git.bash index 5f4290b8..bde515ee 100644 --- a/bash/bash_completion.d/git.bash +++ b/bash/bash_completion.d/git.bash @@ -222,5 +222,10 @@ _git() { esac } -# Defaulting to directory/file completion is important in Git's case -complete -F _git -o bashdefault -o default git +# Defaulting to directory/file completion is important in Git's case; +# bashdefault requires Bash >=3.0 +if ((BASH_VERSINFO[0] >= 3)) ; then + complete -F _git -o bashdefault -o default git +else + complete -F _git -o default git +fi |