forked from extern/nushell
Disable rustyline bracketed paste mode by default (#2659)
Multiline pastes wait for the user to hit enter before running, because they enter a special paste mode in rustyline called 'bracketed paste' by default. This commit disables that mode by default for nushell, causing multiline pastes to be executed immediately, treating each new line as a separate command.
This commit is contained in:
parent
43d90c1745
commit
cfac8e84dd
@ -669,6 +669,9 @@ fn default_rustyline_editor_configuration() -> Editor<Helper> {
|
||||
Cmd::Move(Movement::ForwardWord(1, At::AfterEnd, Word::Vi)),
|
||||
);
|
||||
|
||||
// workaround for multiline-paste hang in rustyline (see https://github.com/kkawakam/rustyline/issues/202)
|
||||
rl.bind_sequence(KeyPress::BracketedPasteStart, rustyline::Cmd::Noop);
|
||||
|
||||
// Let's set the defaults up front and then override them later if the user indicates
|
||||
// defaults taken from here https://github.com/kkawakam/rustyline/blob/2fe886c9576c1ea13ca0e5808053ad491a6fe049/src/config.rs#L150-L167
|
||||
rl.set_max_history_size(100);
|
||||
|
Loading…
Reference in New Issue
Block a user