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

Added back exit code support #91

Merged
merged 22 commits into from Sep 23, 2020
Merged

Added back exit code support #91

merged 22 commits into from Sep 23, 2020

Conversation

twolfson
Copy link
Owner

In #88 and #89, we moved to PROMPT_COMMAND and added exit code support. In #90, we discovered we broke existing PS1 extension mechanisms due to always setting the variable

This PR moves to a hybrid where we track the items we need for exit code support via a PROMPT_COMMAND hook and exposes them as globals

In this PR:

  • Added back same exit code config, logic, and documentation
  • Added back Travis CI notification patch
  • Patched PROMPT_COMMAND as a hook, to only expose globals for PS1
  • Added PROMPT_COMMAND extension logic
  • Updated PS1 to use globals from PROMPT_COMMAND
  • Updated tests
  • Fixes Exit code reporting #82 again

/cc @rpdelaney

@twolfson
Copy link
Owner Author

Also, fwiw -- we did sanity check that this works with the PS1 extension as reported in #90 again =)

Selection_224

@twolfson
Copy link
Owner Author

Guessing @rpdelaney is still in the process of moving. It's been 11 days since I wrote this though so I've forgotten everything. Going to give it a review and likely land it

Copy link
Owner Author

@twolfson twolfson left a comment

Choose a reason for hiding this comment

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

LGTM

@twolfson twolfson merged commit 0bb20a3 into master Sep 23, 2020
@twolfson twolfson deleted the dev/exit.code.v2 branch September 23, 2020 23:53
@twolfson twolfson restored the dev/exit.code.v2 branch September 23, 2020 23:56
@twolfson twolfson deleted the dev/exit.code.v2 branch September 23, 2020 23:56
@twolfson twolfson mentioned this pull request Sep 24, 2020
@twolfson
Copy link
Owner Author

This has been landed in 1.1.0

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.

Exit code reporting
1 participant