diff options
author | Amir Yalon <amiryal@git> | 2009-07-26 18:03:48 +0800 |
---|---|---|
committer | Leonid Volnitsky <leonid@volnitsky.com> | 2009-07-28 16:06:31 +0800 |
commit | e46ba803b9db0a46ca5e431c8258eeca3774b215 (patch) | |
tree | 7f6086d186adf3e2b72ad91a2fb68af1f0199f28 /git-prompt.sh | |
parent | -- fixed: bash < 3.1 don't support regex (cwd_truncate was disabled) (diff) | |
download | git-prompt-e46ba803b9db0a46ca5e431c8258eeca3774b215.tar.gz git-prompt-e46ba803b9db0a46ca5e431c8258eeca3774b215.tar.bz2 git-prompt-e46ba803b9db0a46ca5e431c8258eeca3774b215.zip |
fix to support future major Bash versions >3
Signed-off-by: Leonid Volnitsky <leonid@volnitsky.com>
Diffstat (limited to 'git-prompt.sh')
-rwxr-xr-x | git-prompt.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/git-prompt.sh b/git-prompt.sh index d8d6e2f..54a1690 100755 --- a/git-prompt.sh +++ b/git-prompt.sh @@ -165,7 +165,7 @@ cwd_truncate() { return ;; *) - if [[ ${BASH_VERSINFO[0]} -ge 3 && ${BASH_VERSINFO[1]} -ge 2 ]] ; then + if [[ ${BASH_VERSINFO[0]} -ge 3 && ${BASH_VERSINFO[1]} -ge 2 || ${BASH_VERSINFO[0]} -gt 3 ]] ; then local cwd_max_length=$1 else # if bash < v3.2 then don't truncate |