From 1b6f9d10220178f8f69986d57d9441d9f669f7df Mon Sep 17 00:00:00 2001 From: Aditya Bhargava Date: Thu, 23 Apr 2026 14:10:50 -0400 Subject: fix: minor issues with fish's vim mode(s) (#3362) This PR fixes two minor issues when using Atuin with fish's vim mode(s): 1. Add support for `fish_hybrid_key_bindings`: in addition to `fish_vi_key_bindings`, fish also provides `fish_hybrid_key_bindings`, which is a vi-based mode with some extra keybinds; but the key bind check for `atuin search` only checks for the former. 2. The AI keybind inserts a `?` on the command line in vim mode even though it can only be called from normal mode, when pressing `?` normally does nothing. --- crates/atuin-ai/src/commands/init.rs | 2 +- crates/atuin/src/shell/atuin.fish | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/atuin-ai/src/commands/init.rs b/crates/atuin-ai/src/commands/init.rs index f693d892..1f03f5b1 100644 --- a/crates/atuin-ai/src/commands/init.rs +++ b/crates/atuin-ai/src/commands/init.rs @@ -176,7 +176,7 @@ function _atuin_ai_question_mark else commandline -f repaint end - else + else if not contains -- "$fish_key_bindings" fish_vi_key_bindings fish_hybrid_key_bindings # Not at empty prompt, just insert the question mark commandline -i "?" end diff --git a/crates/atuin/src/shell/atuin.fish b/crates/atuin/src/shell/atuin.fish index d1333e46..87e93923 100644 --- a/crates/atuin/src/shell/atuin.fish +++ b/crates/atuin/src/shell/atuin.fish @@ -67,7 +67,7 @@ end function _atuin_search set -l keymap_mode switch $fish_key_bindings - case fish_vi_key_bindings + case fish_vi_key_bindings fish_hybrid_key_bindings switch $fish_bind_mode case default set keymap_mode vim-normal -- cgit v1.3.1