nushell: 0.90.1 regression: alt+d throws an error message
Describe the bug
When alt+d is pressed in the middle of a command line, it shows the error: cat: write error: Broken pipe. I have not redefined the key, so the default value is used:
╭──────────┬──────────────────────╮
│ mode │ emacs │
│ modifier │ KeyModifiers(ALT) │
│ code │ Char('d') │
│ event │ Edit([CutWordRight]) │
╰──────────┴──────────────────────╯
How to reproduce
- Type two characters, e.g. ‘ab’
- Move the cursor back one character using
ctrl+borLeft - Press
alt+d
Expected behavior
Expected: b is erased, no error message
Actual: b is erased with error message
Screenshots
Configuration
| key | value |
|---|---|
| version | 0.90.1 |
| branch | makepkg |
| commit_hash | c2992d5d8b8541b64e9fc1440ed2917fc9b757f7 |
| build_os | linux-x86_64 |
| build_target | x86_64-unknown-linux-gnu |
| rust_version | rustc 1.75.0 (82e1608df 2023-12-21) (Arch Linux rust 1:1.75.0-2) |
| cargo_version | cargo 1.75.0 |
| build_time | 2024-02-09 11:43:38 +00:00 |
| build_rust_channel | release |
| allocator | mimalloc |
| features | dataframe, default, extra, sqlite, trash, which, zip |
| installed_plugins |
Additional context
No response
About this issue
- Original URL
- State: closed
- Created 4 months ago
- Comments: 17 (12 by maintainers)
Found the reason: I had
wl-paste --watch cliphist storeautostarted on login. I reinstalled the system but didn’t install thecliphistbinary, so it was this command throwing errors. After installingcliphistit’s all fine.But this reveals a much larger problem: every edit/cut in Nushell is now copied to the system clipboard. This is bad for a number of reasons:
I’m sure the “shift+navigation” feature can be useful, but changing the clipboard behavior this way is a disaster. If this feature can not be implemented without interacting with the system clipboard, then at least it should be configurable by a user and default to false, so a user will have to explicitly say “Yes, I realize the consequences and agree to copy anything cut in the shell to the system clipboard”.
Ugh, why are clipboard crates such a pain. lol.
No, if it was from history, then it would appear immediately after typing
a. As I described, it happens specifically on alt+d. Also, thisLANG= nuis to show how it looks in the english locale. My system locale is russian and the error message is also in russian which proves that it’s an external error indeed.I’ll try to build the latest master