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
Move to clearer reedline keyboard enhancement API #11045
Move to clearer reedline keyboard enhancement API #11045
Conversation
Go from the ill-defined `enable/disable` pairs to `.use_...` builders This alleviates unclear properties when the underlying enhancements are enabled. Now they are enabed when entering `Reedline::read_line` and disabled when exiting that. Furthermore allow setting `$env.config.use_kitty_protocol` to have an effect when toggling during runtime. Previously it was only enabled when receiving a value from `config.nu`. I kept the warning code there to not pollute the log. We could move it into the REPL-loop if desired Not sure if we should actively block the enabling of `bracketed_paste` on Windows. Need to test what happens if it just doesn't do anything we could remove the `cfg!` switch. At least for WSL2 Windows Terminal already supports bracketed paste. `target_os = windows` is a bad predictor for `conhost.exe`. Depends on nushell/reedline#659 (pointing to personal fork) Closes nushell#10982 Supersedes nushell#10998
As discussed on #10998, bracketed paste really shouldn't be disabled on Windows. Bracketed paste either works in terminals that support it or should be ignored on others. That is not related to the OS at all. Also did you mean to commit your changes to Other than that I think it looks good. Let's make sure it is tested properly. |
Agree that we should not make a full platform assumption and in the best case only dispatch based on the terminal emulator we are facing. Sadly Removing the When trying to trigger the situation where crossterm doesn't make the assumption it lives in old Windows land, I ran into the issue described in #10808 |
Go from the ill-defined `enable/disable` pairs to `.use_...` builders This alleviates unclear properties when the underlying enhancements are enabled. Now they are enabed when entering `Reedline::read_line` and disabled when exiting that. Furthermore allow setting `$env.config.use_kitty_protocol` to have an effect when toggling during runtime. Previously it was only enabled when receiving a value from `config.nu`. I kept the warning code there to not pollute the log. We could move it into the REPL-loop if desired Not sure if we should actively block the enabling of `bracketed_paste` on Windows. Need to test what happens if it just doesn't do anything we could remove the `cfg!` switch. At least for WSL2 Windows Terminal already supports bracketed paste. `target_os = windows` is a bad predictor for `conhost.exe`. Depends on nushell/reedline#659 (pointing to personal fork) Closes nushell#10982 Supersedes nushell#10998
Go from the ill-defined `enable/disable` pairs to `.use_...` builders This alleviates unclear properties when the underlying enhancements are enabled. Now they are enabed when entering `Reedline::read_line` and disabled when exiting that. Furthermore allow setting `$env.config.use_kitty_protocol` to have an effect when toggling during runtime. Previously it was only enabled when receiving a value from `config.nu`. I kept the warning code there to not pollute the log. We could move it into the REPL-loop if desired Not sure if we should actively block the enabling of `bracketed_paste` on Windows. Need to test what happens if it just doesn't do anything we could remove the `cfg!` switch. At least for WSL2 Windows Terminal already supports bracketed paste. `target_os = windows` is a bad predictor for `conhost.exe`. Depends on nushell/reedline#659 (pointing to personal fork) Closes nushell#10982 Supersedes nushell#10998
Go from the ill-defined
enable/disable
pairs to.use_...
buildersThis alleviates unclear properties when the underlying enhancements are
enabled. Now they are enabed when entering
Reedline::read_line
anddisabled when exiting that.
Furthermore allow setting
$env.config.use_kitty_protocol
to have aneffect when toggling during runtime. Previously it was only enabled when
receiving a value from
config.nu
. I kept the warning code there to notpollute the log. We could move it into the REPL-loop if desired
Not sure if we should actively block the enabling of
bracketed_paste
on Windows. Need to test what happens if it just doesn't do anything we
could remove the
cfg!
switch. At least for WSL2 Windows Terminalalready supports bracketed paste.
target_os = windows
is a badpredictor for
conhost.exe
.Depends on nushell/reedline#659
(pointing to personal fork)
Closes #10982
Supersedes #10998