rustyline
rustyline copied to clipboard
Conditional Bind Sequences
I use editor.bind_sequence(KeyPress::Esc, Cmd::Interrupt);
Which works. I'm wondering if it could be possible to make it clear text if there's some written text, and if not then Interrupt..
Sorry, you can't do this with rustyline
.
linefeed
can.
We need something like a Cmd::Custom(fn(&mut LineBuffer) -> Action)
.
enum Action {
Continue,
Return,
Bail,
}
like replxx
Same problems here(to bind CompleteHint or ForwardChar to Ctrl-F whether current input pos is at eol), hope this features can be implemented in rustyline
:(
Could you please give a try to PR #293 ?
I will try to provide an example.
And I guess we still need a composite Cmd
to clear text and then interrupt.
This would be really helpful for my terminal app. Id like to be able to use keybindings that depend on the text already entered.
Partially fixed in version 8.0.0 But still no multiple actions