sayanarijit / tui-input

TUI input library supporting multiple backends, tui-rs and ratatui
MIT License
124 stars 12 forks source link

add ALT-BACKSPACE to crossterm's to_input_request #23

Closed micielski closed 3 months ago

micielski commented 3 months ago

ALT-BACKSPACE deletes previous word for various terminal apps like fish or helix editor (I think this keybinding comes from emacs so bash probably respects this keybinding by default too).

I see that there's also a corresponding function for termion, but it doesn't functionally correspond to crossterm's implementation nor isn't documented on docs.rs (both of which issues I could try to tackle in a new PR)

sayanarijit commented 3 months ago

Hi, I have checked, emacs and zsh supports alt-backspace, bash doesn't. But I'm good to add it. But from my experiments, none supports meta-backspace for delete word.

micielski commented 3 months ago

But from my experiments, none supports meta-backspace for delete word.

I can remove meta-backspace if you want me to (it was there already and I didn't add it)

sayanarijit commented 3 months ago

Ah sorry, you're right. Thanks for the PR.