Respect termios ECHO flag#673
Conversation
|
In the future, this PR might not be necessary to get Note that for now, the PR only stops the printing of the input text -- hints, menus, or history will always be shown regardless of the |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #673 +/- ##
==========================================
+ Coverage 49.19% 49.23% +0.04%
==========================================
Files 46 46
Lines 7930 7917 -13
==========================================
- Hits 3901 3898 -3
+ Misses 4029 4019 -10
|
sholderbach
left a comment
There was a problem hiding this comment.
Not sure what is the best choice to test reedline's specifc behavior with rexpect or what conventions arose for other shells when given ~ECHO.
For your Nushell tests in nushell/nushell#11178 having the hinter dump stuff from the history may possibly interfere.
| crossterm = { version = "0.27.0", features = ["serde"] } | ||
| fd-lock = "3.0.3" | ||
| itertools = "0.10.3" | ||
| nix = { version = "0.27.1", features = ["term"] } |
There was a problem hiding this comment.
Not super critical but we could make this a unix only dependency for slightly faster downloads on windows.
There was a problem hiding this comment.
Thanks, forgot to do that.
| // Manage optional kitty protocol | ||
| kitty_protocol: KittyProtocolGuard, | ||
|
|
||
| // Echo typed input |
There was a problem hiding this comment.
As this an absolutely obscure usecase I think expanding this to a small doccomment with pointers what you are trying to achieve and the relation to the termios flag makes sense for future generations.
Thankfully, I don't think this will be an issue:
This is also part of the reason why I was wondering if there was a way to disable the history for nushell or start with a blank history file.
The only example that I know off the top of my head is GNU |
This PR makes it so that the
ECHOflag given by termios is respected. That is, the input characters are not printed/echoed back to the user if theECHOflag is missing. This will help with usingrexpectto testreedlineandnushell, as the syntax highlighting, etc. does not need to be accounted for.Related to: nushell/nushell#11178