From c46ca76cfaaed9826475fe677a08a6c2af6d83fa Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 27 May 2015 18:30:22 +1200 Subject: Add missing globs for version tests --- bash/bashrc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bash/bashrc') diff --git a/bash/bashrc b/bash/bashrc index 3bb973b7..676ff476 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -1,8 +1,8 @@ # Ensure we're using at least version 2.05 if ! test -n "$BASH_VERSINFO" ; then return -elif ((10#${BASH_VERSINFO[0]%%[![:digit:]]} == 2)) \ - && ((10#${BASH_VERSINFO[1]%%[![:digit:]]} < 5)) ; then +elif ((10#${BASH_VERSINFO[0]%%[![:digit:]]*} == 2)) \ + && ((10#${BASH_VERSINFO[1]%%[![:digit:]]*} < 5)) ; then return fi @@ -70,7 +70,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 ((10#${BASH_VERSINFO[0]%%[![:digit:]]*} >= 4)) ; then # Autocorrect fudged paths during completion shopt -s dirspell # Enable double-starring paths @@ -78,7 +78,7 @@ 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 ((10#${BASH_VERSINFO[0]%%[![:digit:]]*} > 4)) \ || ((10#${BASH_VERSINFO[1]%%[![:digit:]]*} > 0)) ; then shopt -s checkjobs fi -- cgit v1.2.3