Help to configure atuin search with ctrl-r (macOS/wezterm/zsh)

TL;DR
I need some help figuring out why my atuin is not triggering the interactive search with ctrl+r by default. :disappointed_face:
Really appreciate your time/support in advance.

Here it goes
I’m on an Apple M2 Sequoia 15.4.1 and use mainly wezterm and zsh; however, also tested and got the same behaviour with ghostty, alacritty, kitty and even iterm.

I want to open the interactive search with ctrl-r, this already happens if I hit ctrl-p or the up-arrow (I have; currently if I use ctrl+r I get my bck-i-search: _ (I used to have fzf and disabled it to check if there was any conflict).

Also checked and there’s no wezterm customisation (in its lua config) around the binding, otherwise I’m assuming it wouldn’t trigger the default bck-i-search anyways.

This is my current info:

{
  "atuin": {
    "version": "18.6.1",
    "sync": null,
    "sqlite_version": "3.46.0"
  },
  "shell": {
    "name": "zsh",
    "default": "zsh",
    "plugins": [
      "atuin"
    ],
    "preexec": "built-in"
  },
  "system": {
    "os": "Darwin",
    "arch": "arm64",
    "version": "15.4.1",
    "disks": [
      {
        "name": "Macintosh HD",
        "filesystem": "apfs"
      },
      {
        "name": "Macintosh HD",
        "filesystem": "apfs"
      }
    ]
  }
}

And on my ~/.zshrc I have:

...

# 👇 checked it and this adds atuin in the PATH 
. "$HOME/.atuin/bin/env" 

# 👇 with the env var active it currently prevents ctrl-p and up-arrow to trigger the search by default
# export ATUIN_NOBIND="true"
eval "$(atuin init zsh)"

# bindkey '^r' atuin-search
# bindkey '^r' _atuin_search
# bindkey '^r' _atuin_search_widget

Tried multiple combos with no success throughout my attempts.
If I execute directly _atuin_search it triggers the interactive search as I wanted, so I assume the issue is around the bindkey.

Thank you

could you share your entire zshrc please? even better if you test it with just the atuin config and confirm the issue still occurs

1 Like

hey @ellie thanks for your comment - nothing better than another clever engineer to rubber duck and make us figure out what’s going on!

honestly, i shouldve done that in the first place but just posted the relevant bits and i completely forgot i wanted to isolate my zsh to its very minimum possible config… and after doing that and commenting out half of everything i managed to find the culprit!!

well i’m not sure it still makes sense keeping in this thread, or in a different one; but still ill document it here so if anyone else is facing the same situation i might be able to help:

in my case the incompatibility comes from another plugin i use here GitHub - jeffreytse/zsh-vi-mode: 💻 A better and friendly vi(vim) mode plugin for ZSH. so i can have vi features in zsh; disabling it works like a charm and i also found that basically in INSERT mode if I use ctrl+r it goes to backwards interactive search, and in NORMAL mode it triggers properly atuin’s search as expected.

do you think it’s valid to explore and document somewhere? happy to provide more info if necessary as well (i believe it’s prob more of a user’s problem knowing how to configure other plugins and ill try to suss it out myself, if i find sth to maybe override the keybind in INSERT mode i update here anyway)