Skip to content
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

Update bash-preexec.sh #62

Merged
merged 5 commits into from
Oct 27, 2017
Merged

Update bash-preexec.sh #62

merged 5 commits into from
Oct 27, 2017

Conversation

lguelorget
Copy link
Contributor

- Avoids infinite recursion with things like export PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
- Preserve trap DEBUG again: revert rcaloras#60
bash-preexec.sh Outdated
@@ -83,10 +86,17 @@ __bp_interactive_mode() {
# This function is installed as part of the PROMPT_COMMAND.
# It will invoke any functions defined in the precmd_functions array.
__bp_precmd_invoke_cmd() {

# Save the returned value from our last command
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is problem is quite unintuitive, I think putting a comment like

# Save the returned value from our last command. Note: this MUST be the
# first thing done in this function.

would help avoid it resurfacing in the future.

@rcaloras rcaloras merged commit cc12466 into rcaloras:master Oct 27, 2017
@lguelorget lguelorget deleted the patch-1 branch October 27, 2017 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants