You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the time of writing, the input-handling branch of crossterm is in the works to provide an abstraction to make it easy to handle multi-line input.
We want to replace the ion copy and paste solution with this, so we don't have "it works when it works, but is difficult to understand what's wrong when you make a mistake".
Original problem: Reading multiple inputs per frame
In order to read multiple inputs per frame, we had to choose from:
Modify command to take in args for multiple events + change StdinMapper to read multiple events as return value.
Have a CommandSetStdinCommand, which indicates the number of commands to keep reading in StdinSystem and keep sending.
Figure out how to parse connectors in input.
We went with the last option, copying code from the ion shell. A side effect of this change is, we need to insert "#" instead of use blank lines to indicate "no input this frame", because:
StdinReader reads everything from stdin really quickly, sending it to the channel.
StdinSystem reads and sends one "command chain" each dispatcher.update()
Blank lines no longer mean "nothing happened", but "just whitespace in the file".
The "#" indicates "nothing happened this frame".
The text was updated successfully, but these errors were encountered:
In GitLab by @azriel91 on Mar 30, 2019, 13:55
At the time of writing, the
input-handling
branch ofcrossterm
is in the works to provide an abstraction to make it easy to handle multi-line input.We want to replace the
ion
copy and paste solution with this, so we don't have "it works when it works, but is difficult to understand what's wrong when you make a mistake".Maybe use
rustyline
(repo).Original problem: Reading multiple inputs per frame
In order to read multiple inputs per frame, we had to choose from:
StdinMapper
to read multiple events as return value.CommandSet
StdinCommand
, which indicates the number of commands to keep reading inStdinSystem
and keep sending.We went with the last option, copying code from the
ion
shell. A side effect of this change is, we need to insert "#" instead of use blank lines to indicate "no input this frame", because:StdinReader
reads everything from stdin really quickly, sending it to the channel.StdinSystem
reads and sends one "command chain" eachdispatcher.update()
The text was updated successfully, but these errors were encountered: