diff options
author | Remmy Cat Stock <3317423+remmycat@users.noreply.github.com> | 2024-02-28 15:01:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-28 14:01:15 +0000 |
commit | 593dc410eb3d5d7d409b780b9c7bd22ee4aa8654 (patch) | |
tree | 691dd84b04148d3388af82680a914d54a229992e | |
parent | 9def30b3c58ed03908d3e1c494c0d46dd66ee625 (diff) |
fix(nushell): readd up-arrow keybinding, now with menu handling (#1770)
-rw-r--r-- | atuin/src/command/client/init.rs | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/atuin/src/command/client/init.rs b/atuin/src/command/client/init.rs index 9bff3fcc..d9bad148 100644 --- a/atuin/src/command/client/init.rs +++ b/atuin/src/command/client/init.rs @@ -56,20 +56,23 @@ impl Cmd { ) )"; const BIND_UP_ARROW: &str = r" -# The up arrow keybinding has surprising behavior in Nu, and is disabled by default. -# See https://github.com/atuinsh/atuin/issues/1025 for details -# $env.config = ( -# $env.config | upsert keybindings ( -# $env.config.keybindings -# | append { -# name: atuin -# modifier: none -# keycode: up -# mode: [emacs, vi_normal, vi_insert] -# event: { send: executehostcommand cmd: (_atuin_search_cmd '--shell-up-key-binding') } -# } -# ) -# ) +$env.config = ( + $env.config | upsert keybindings ( + $env.config.keybindings + | append { + name: atuin + modifier: none + keycode: up + mode: [emacs, vi_normal, vi_insert] + event: { + until: [ + {send: menuup} + {send: executehostcommand cmd: (_atuin_search_cmd '--shell-up-key-binding') } + ] + } + } + ) +) "; if !self.disable_ctrl_r { println!("{BIND_CTRL_R}"); |