aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc
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/bashrc
parentCorrect typo in version number (diff)
downloaddotfiles-c46ca76cfaaed9826475fe677a08a6c2af6d83fa.tar.gz
dotfiles-c46ca76cfaaed9826475fe677a08a6c2af6d83fa.zip
Add missing globs for version tests
Diffstat (limited to 'bash/bashrc')
-rw-r--r--bash/bashrc8
1 files changed, 4 insertions, 4 deletions
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