aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2015-05-27 18:17:17 +1200
committerTom Ryder <tom@sanctum.geek.nz>2015-05-27 18:17:17 +1200
commit072fcb9e064705395e3bac40d9d05c4196fe5ced (patch)
treef6bb5a0afd9926ad59cf2f1ba687a1135ed6351e /bash/bashrc
parentAttempt to read .bashrc on existence (diff)
downloaddotfiles-072fcb9e064705395e3bac40d9d05c4196fe5ced.tar.gz
dotfiles-072fcb9e064705395e3bac40d9d05c4196fe5ced.zip
Work around shopt checkjobs bug with Bash 4.0
<https://lists.gnu.org/archive/html/bug-bash/2009-02/msg00176.html>
Diffstat (limited to 'bash/bashrc')
-rw-r--r--bash/bashrc9
1 files changed, 7 insertions, 2 deletions
diff --git a/bash/bashrc b/bash/bashrc
index 0f750830..4ee573e0 100644
--- a/bash/bashrc
+++ b/bash/bashrc
@@ -71,12 +71,17 @@ shopt -u sourcepath
# These options only exist since Bash 4.0-alpha
if ((10#${BASH_VERSINFO[0]%%[![:digit:]]} >= 4)) ; then
- # Warn me about stopped jobs when exiting
- shopt -s checkjobs
# Autocorrect fudged paths during completion
shopt -s dirspell
# Enable double-starring paths
shopt -s globstar
+
+ # 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)) \
+ || ((10#${BASH_VERSINFO[1]%%[![:digit:]]*} > 0)) ; then
+ shopt -s checkjobs
+ fi
fi
# Load any supplementary scripts