-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Allow input stream termination by sending end-of-transmission character #937
Merged
caendesilva
merged 28 commits into
publications-feature
from
change-input-string-handler-termination-sequence
Feb 8, 2023
Merged
Allow input stream termination by sending end-of-transmission character #937
caendesilva
merged 28 commits into
publications-feature
from
change-input-string-handler-termination-sequence
Feb 8, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Feb 8, 2023
Codecov Report
@@ Coverage Diff @@
## publications-feature #937 +/- ##
==========================================================
Coverage 100.00% 100.00%
+ Complexity 3194 1601 -1593
==========================================================
Files 348 174 -174
Lines 7962 3985 -3977
==========================================================
- Hits 7962 3985 -3977 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Flip order of termination options
This reverts commit 4e622ca.
caendesilva
force-pushed
the
change-input-string-handler-termination-sequence
branch
from
February 8, 2023 21:01
5e94b54
to
b60b017
Compare
Provides regression testing
…termination-sequence
caendesilva
deleted the
change-input-string-handler-termination-sequence
branch
February 8, 2023 21:06
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In addition to the added
'<<<'
sequence added in #936, this PR allows for an alternate method to terminate an input stream: by sending an End-of-Transmission character, usually viaCTRL+D
You still need to finish with hitting enter as I have not yet figured out a way to read live input instead of a line-to-line basis.Edit: It seems like
CTRL+D
on Windows sends an EOT Ascii character,but CTRL+Z+Enter
on Windows seems to provide the same result asCTRL+D
on Unix. This actually seems to return false from the standard input stream in PHP, so I think we should use that. It's also what Symfony usesOkay: ways to terminate:
'<<<'
on single line (Windows+Unix*)CTRL+D
(Unix*)CTRL+D
thenenter
(Windows)CTRL+Z
thenenter
(Windows)*Tested only in WSL2 but should work on actual Linux and macOS systems.
This IMO is nicer than the Symfony implementation, as it allows for cross platform
CTRL+D
support (in theory).The PR also updates output messages for this and the previous change, hence why the PR is so comparatively big.