-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no preexec call for subshells #164
Comments
It caused the problem reported in #25, so it was turned off by default in commit 6db22a5. Bash >= 5.0 are free from the reported problem, so if you want to enable it, you can set a non-empty value to a global shell variable However, $ (echo 1; echo 2); echo 3; echo 4
1
2
preexec <-- We wanted this before "1"
3
4
precmd
$ __bp_enable_subshells=1 bash
$ (echo 1; echo 2); echo 3; echo 4
preexec <-- Expected. Now, we have preexec at the beginning
1
preexec <-- We do not want this
2
preexec <-- We do not want this
3
4
precmd
$ "PS0 & signal" or "PS0 & funsub" discussed in #28 should provide a better solution. |
Could the multiple preexec issue be solved in bash 5.0, 5.1, and 5.2 with a new internal variable to suppress it? Something like this before calling preexec: if [[ "$__bp_done_preexec" = "1" ]]; then
return
fi
__bp_done_preexec=1
... # call preexec And in precmd: __bp_done_preexec=0 |
We are already doing this with the variable Lines 234 to 242 in 8926de0
The second preexec (before The third preexec (before |
Similar to #6, I'm not seeing preexec calls for subshells. That was supposed to be fixed in #22 though, right?
The text was updated successfully, but these errors were encountered: