aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-11-30 13:21:50 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-11-30 13:21:50 +1300
commitda4e6a80a24bc1002e06b0b4a386254a5d5cb050 (patch)
tree279f27aae77dc7316cd6d1c85c1f7766f4bb9490 /bash/bashrc
parentMerge branch 'hotfix/v2.1.1' into develop (diff)
downloaddotfiles-da4e6a80a24bc1002e06b0b4a386254a5d5cb050.tar.gz
dotfiles-da4e6a80a24bc1002e06b0b4a386254a5d5cb050.zip
Drop support for Bash <= 3.0
This allows removing a fair bit of boilerplate checking for the availability of `-o bashdefault` for the `complete` builtin, and greatly simplifies the minimum version check.
Diffstat (limited to 'bash/bashrc')
-rw-r--r--bash/bashrc9
1 files changed, 2 insertions, 7 deletions
diff --git a/bash/bashrc b/bash/bashrc
index 8462e5c2..06cbb6b3 100644
--- a/bash/bashrc
+++ b/bash/bashrc
@@ -18,14 +18,9 @@ unalias -a
# we should be able to do this even if we're running a truly ancient Bash
[ -n "$ENV" ] && . "$ENV"
-# Ensure we're using at least version 2.05. Weird arithmetic syntax needed here
-# due to leading zeroes and trailing letters in some 2.x version numbers (e.g.
-# 2.05a).
-# shellcheck disable=SC2128
+# Ensure we're using at least version 3.0.
[ -n "$BASH_VERSINFO" ] || return
-((BASH_VERSINFO[0] == 2)) &&
- ((10#${BASH_VERSINFO[1]%%[!0-9]*} < 5)) &&
- return
+((BASH_VERSINFO[0] >= 3)) || return
# Clear away command_not_found_handle if a system bashrc file set it up
unset -f command_not_found_handle