nushell
nushell copied to clipboard
Prompt rendering 2 times if prompt contains newline, when first starting nushell and pressing a key
Describe the bug
i noticed this when using the starship prompt with nushell that has a similar config to this:
$env.PROMPT_INDICATOR = ""
$env.PROMPT_COMMAND = {|| ( echo "test\n>" )}
(the rest of my config is pretty much default)
now, when i open nushell and i press any key, the prompt will be rendered again
a very weird thing i noticed with windows terminal is that i can create a new tab, and then this will not happen (see clip).
How to reproduce
- use the values above in config.nu
- open nushell and type something
- the prompt should be rendered 2 times
Expected behavior
the prompt should not be redrawn
Screenshots
https://github.com/nushell/nushell/assets/104733404/1dc2f73d-2986-4db4-b87d-7a166e95764a
Configuration
| key | value |
|---|---|
| version | 0.89.1 |
| branch | main |
| commit_hash | 9ee8d746588d848d841ed4e0dbcce8b8874a01d5 |
| build_os | windows-x86_64 |
| build_target | x86_64-pc-windows-msvc |
| rust_version | rustc 1.73.0 (cc66ad468 2023-10-03) |
| rust_channel | 1.73.0-x86_64-pc-windows-msvc |
| cargo_version | cargo 1.73.0 (9c4383fb5 2023-08-26) |
| build_time | 2024-01-21 14:03:27 +01:00 |
| build_rust_channel | release |
| allocator | mimalloc |
| features | default, sqlite, trash, which, zip |
| installed_plugins |
Additional context
No response
it would be great to fix this double render.
I have the same issue.