Repository navigation
Conversation
The Shell joins '+' continuation lines into Run's argument line, and the background CLI reads them from its script input. Run gave the commands the same handle as Input(). RunCommand() injects each command's arguments into Input() and flushes it afterwards, so only the first line ran. With continuation lines the commands now get their own NIL: input. The command taken from the argument line already holds these lines, so the buffered input is appended only to a single line; otherwise they would run twice. runcommandredir checks that every continued line runs once.
This file contains hidden or 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
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 a script,
Runran only the first line of a+continuation:OUT:d.txtwas never written. The Shell joins the lines into Run's argument line and the background CLI reads them from its script input, but Run gave the started commands the same handle asInput().RunCommand()injects each command's arguments intoInput()and flushes it afterwards, which drops the lines not yet read. With continuation lines the commands now get their ownNIL:input, which the CLI closes on exit like before. A single-lineRun, includingRun Execute script, keeps the shared handle.The command taken from the argument line already holds the continuation lines, so Run appends its buffered input only to a single line. Otherwise the fixed CLI would run them twice.
runcommandredirgains a case with continued lines: each must run once and readNIL:. It fails on the current Run.