Skip to content

Commit

Permalink
Disabling subshells by default to help with #25
Browse files Browse the repository at this point in the history
- it can be enabled by setting __bp_enable_subshells
  • Loading branch information
rcaloras committed Aug 17, 2016
1 parent f2370fe commit 6db22a5
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions bash-preexec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6db22a5

Please sign in to comment.