aboutsummaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2015-05-27 18:30:22 +1200
committerTom Ryder <tom@sanctum.geek.nz>2015-05-27 18:30:22 +1200
commitc46ca76cfaaed9826475fe677a08a6c2af6d83fa (patch)
tree7e57de9cac07e55d0022266ce58f2957af31ba08 /bash
parentCorrect typo in version number (diff)
downloaddotfiles-c46ca76cfaaed9826475fe677a08a6c2af6d83fa.tar.gz
dotfiles-c46ca76cfaaed9826475fe677a08a6c2af6d83fa.zip
Add missing globs for version tests
Diffstat (limited to 'bash')
-rw-r--r--bash/bash_logout4
-rw-r--r--bash/bash_profile4
-rw-r--r--bash/bashrc8
3 files changed, 8 insertions, 8 deletions
diff --git a/bash/bash_logout b/bash/bash_logout
index 96fc4e3c..8d703a79 100644
--- a/bash/bash_logout
+++ b/bash/bash_logout
@@ -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:]]*} < 4)) ; then
return
fi
diff --git a/bash/bash_profile b/bash/bash_profile
index 4e25ab24..91c0f867 100644
--- a/bash/bash_profile
+++ b/bash/bash_profile
@@ -6,8 +6,8 @@ fi
# 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
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
# <https://lists.gnu.org/archive/html/bug-bash/2009-02/msg00176.html>
- 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