From 072fcb9e064705395e3bac40d9d05c4196fe5ced Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 27 May 2015 18:17:17 +1200 Subject: Work around shopt checkjobs bug with Bash 4.0 --- bash/bashrc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'bash/bashrc') 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 + # + if ((10#${BASH_VERSINFO[0]%%[![:digit:]]} > 4)) \ + || ((10#${BASH_VERSINFO[1]%%[![:digit:]]*} > 0)) ; then + shopt -s checkjobs + fi fi # Load any supplementary scripts -- cgit v1.2.3