From 76e7f6a8843c7e4aefe34fa44776742685c584fa Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 6 Jun 2015 23:55:20 +1200 Subject: Safer version test --- bash/bashrc.d/prompt.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bash/bashrc.d/prompt.bash') diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash index fa46a5dd..94e49ff2 100644 --- a/bash/bashrc.d/prompt.bash +++ b/bash/bashrc.d/prompt.bash @@ -17,7 +17,7 @@ prompt() { PS1='[\u@\h:\w]$(prompt job)$(prompt vcs)$(prompt ret)\$' # If Bash 4.0 is available, trim very long paths in prompt - if ((BASH_VERSINFO[0] >= 4)) ; then + if ((10#${BASH_VERSINFO[0]%%[![:digit:]]*} >= 4)) ; then PROMPT_DIRTRIM=4 fi -- cgit v1.2.3