From 37e1d75d0c51a2e8e947ae524e4e686e0a9eeffc Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 22 Aug 2015 19:15:56 +1200 Subject: Remove overkill chopping on BASH_VERSINFO[0] Pointed out by Amy Grace. --- bash/bashrc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bash/bashrc') diff --git a/bash/bashrc b/bash/bashrc index 17feeb06..a80d827d 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -1,7 +1,7 @@ # Ensure we're using at least version 2.05 if ! [ -n "$BASH_VERSINFO" ] ; then return -elif ((10#${BASH_VERSINFO[0]%%[![:digit:]]*} == 2)) && \ +elif ((BASH_VERSINFO[0] == 2)) && \ ((10#${BASH_VERSINFO[1]%%[![:digit:]]*} < 5)) ; then return fi @@ -77,7 +77,7 @@ shopt -s shift_verbose shopt -u sourcepath # These options only exist since Bash 4.0-alpha -if ((10#${BASH_VERSINFO[0]%%[![:digit:]]*} >= 4)) ; then +if ((BASH_VERSINFO[0] >= 4)) ; then # Autocorrect fudged paths during completion shopt -s dirspell @@ -86,13 +86,13 @@ if ((10#${BASH_VERSINFO[0]%%[![:digit:]]*} >= 4)) ; then # Warn me about stopped jobs when exiting; only if >=4.1 due to bug # - if ((10#${BASH_VERSINFO[0]%%[![:digit:]]*} > 4)) || \ + if ((BASH_VERSINFO[0] > 4)) || \ ((10#${BASH_VERSINFO[1]%%[![:digit:]]*} >= 1)) ; then shopt -s checkjobs fi # Expand variables in directory completion - if ((10#${BASH_VERSINFO[0]%%[![:digit:]]*} > 4)) || \ + if ((BASH_VERSINFO[0] > 4)) || \ ((10#${BASH_VERSINFO[1]%%[![:digit:]]*} >= 3)) ; then shopt -s direxpand fi -- cgit v1.2.3