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

Clear eval_exitonfalse when setting up a new input stream. #119

Merged
merged 1 commit into from
Sep 14, 2024

Conversation

jpco
Copy link
Collaborator

@jpco jpco commented Sep 14, 2024

This causes %exit-on-false, as part of %dispatch, to be the actual trigger for the exit-on-false behavior. The implementation context strongly implies that the current behavior is a bug. (Why would we use %exit-on-false, whose only job is to set eval_exitonfalse to 1, and also just leave eval_exitonfalse as 1 ourselves? Why would we explicitly call $fn-%dispatch false in the error exception handler if we expected a simple call to false to exit the shell too?)

This also makes using es -e with any kind of overriden REPL much easier, because %prompt and other REPL hooks can no longer trigger the exit-on-false behavior.

This is one part of #73, but because this part is almost definitely just a bug, while the rest is more about design improvements, I am merging this part more unilaterally.

This causes %exit-on-false, as part of %dispatch, to be the actual trigger for the exit-on-false behavior.  The implementation context strongly implies that the current behavior is a bug.  (Why would we use %exit-on-false, whose only job is to set eval_exitonfalse to 1, and also just leave eval_exitonfalse as 1 ourselves?)

This also makes using `es -e` with any kind of overriden REPL much easier, because %prompt and other REPL hooks can no longer trigger the exit-on-false behavior.

This is one part of wryun#73, but because this part is almost definitely just a bug, while the rest is more about design improvements, I am merging this part more unilaterally.
@jpco jpco added the bug label Sep 14, 2024
@jpco jpco merged commit b2bfcfd into wryun:master Sep 14, 2024
1 check passed
@jpco jpco deleted the exitonfalsebug branch September 14, 2024 14:58
jpco added a commit to jpco/es-shell that referenced this pull request Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant