-
Notifications
You must be signed in to change notification settings - Fork 134
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix (properly) the logic around prompt re-use & Host Command handling #770
Conversation
This example isn't perfect DX/UX, there's a bad case with a multi-line prompt + cursor on one of the first lines + executing command A solution would be to use the command |
Hello! |
I've played a little bit with this without nushell and it appears to be outputting less ansi escape codes, which is good. Separately, on my own and unrelated to this PR, I'm trying to figure out how/why reedline prints so many CRLFs in nushell and also how/why the prompt is redrawn with every character typed. |
Hello o/ |
@bew does this 'bad case' still exist? |
The 'bad case' I mentioned is only a limitation with the example, due to using 'echo' in the keybind. To property solve this limitation with using |
ok, thanks. let's try it because we're a week away from a release. if we don't try it now, it'll have to wait until after the release. |
First PR for nushell/reedline \o/
Revert/Rewrites #758
Fixes #755 (correctly this time 馃槵)
Where did the newline actually come from in that issue?
The phantom newline that OP reported was due to this block in painter initialization:
(馃憠 It would detect some text before the cursor and always make a new prompt on the next line..)
reedline/src/painting/painter.rs
Lines 107 to 120 in 0698712
Fixes #771 (my issue)
Now I have the same experience than on my zsh config 馃槂
Supports everything I mentioned in #771
Supports replacing the prompt (even from multi-line old prompt)
Demo
nushell.fixed.prompt.mov
MISSING(DONE)What do you think of this implementation?