From 6db22a55d0fcefd3cd137ccbea6484702b351c06 Mon Sep 17 00:00:00 2001 From: Ryan Caloras Date: Sun, 24 Jul 2016 20:16:23 -0400 Subject: [PATCH 1/2] Disabling subshells by default to help with #25 - it can be enabled by setting __bp_enable_subshells --- bash-preexec.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/bash-preexec.sh b/bash-preexec.sh index 31aa937..da9e742 100644 --- a/bash-preexec.sh +++ b/bash-preexec.sh @@ -234,9 +234,17 @@ __bp_install() { # Adjust our HISTCONTROL Variable if needed. __bp_adjust_histcontrol - # Set so debug trap will work be invoked in subshells. - set -o functrace > /dev/null 2>&1 - shopt -s extdebug > /dev/null 2>&1 + + # Issue #25. Setting debug trap for subshells causes sessions to exit for + # backgrounded subshell commands (e.g. (pwd)& ). Believe this is a bug in Bash. + # + # Disabling this by default. It can be enabled by setting this variable. + if [[ -n "$__bp_enable_subshells" ]]; then + + # Set so debug trap will work be invoked in subshells. + set -o functrace > /dev/null 2>&1 + shopt -s extdebug > /dev/null 2>&1 + fi; local existing_prompt_command From 2813de0ec130355904e78a0fc31c764805c1e3bd Mon Sep 17 00:00:00 2001 From: Ryan Caloras Date: Wed, 17 Aug 2016 01:50:16 -0400 Subject: [PATCH 2/2] Bump version to 0.3.1 --- bash-preexec.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bash-preexec.sh b/bash-preexec.sh index da9e742..d93cb9a 100644 --- a/bash-preexec.sh +++ b/bash-preexec.sh @@ -11,7 +11,7 @@ # Author: Ryan Caloras (ryan@bashhub.com) # Forked from Original Author: Glyph Lefkowitz # -# V0.3.0 +# V0.3.1 # # General Usage: