diff --git a/crates/nu-cli/src/reedline_config.rs b/crates/nu-cli/src/reedline_config.rs index 7723341efc..ef04966cbd 100644 --- a/crates/nu-cli/src/reedline_config.rs +++ b/crates/nu-cli/src/reedline_config.rs @@ -543,6 +543,15 @@ pub(crate) fn create_keybindings(config: &Config) -> Result { + add_menu_keybindings(&mut emacs_keybindings); + } + _ => { + add_menu_keybindings(&mut insert_keybindings); + add_menu_keybindings(&mut normal_keybindings); + } + } for keybinding in parsed_keybindings { add_keybinding( &keybinding.mode, @@ -555,20 +564,11 @@ pub(crate) fn create_keybindings(config: &Config) -> Result { - add_menu_keybindings(&mut emacs_keybindings); - - Ok(KeybindingsMode::Emacs(emacs_keybindings)) - } - _ => { - add_menu_keybindings(&mut insert_keybindings); - add_menu_keybindings(&mut normal_keybindings); - - Ok(KeybindingsMode::Vi { - insert_keybindings, - normal_keybindings, - }) - } + "emacs" => Ok(KeybindingsMode::Emacs(emacs_keybindings)), + _ => Ok(KeybindingsMode::Vi { + insert_keybindings, + normal_keybindings, + }), } }