Key binding for reverse search

HNY everyone. My zsh reverse search doesn’t work. I’m using GNOME. I’ve tried adding

bindkey -e
bindkey '^R' history-incremental-search-backward

in my zshrc but it looks like it only remembers for the terminal session. i.e. it will only reverse search for the commands that I’ve entered in the current terminal session.
Obviously, this isn’t ideal - I’d like to be able to ctrl-r for my entire history. Can someone please advise me on how to do this?

Lower case “r”? I have bindkey '^r' _atuin_search_widget to run atuin, it works.

Thanks, I tried that. It still doesn’t work, though :frowning:

From the Arch wiki, I’ve tried adding

autoload -Uz up-line-or-beginning-search down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search

[[ -n "${key[Up]}"   ]] && bindkey -- "${key[Up]}"   up-line-or-beginning-search
[[ -n "${key[Down]}" ]] && bindkey -- "${key[Down]}" down-line-or-beginning-search

That doesn’t work. Here is my current .zshrc configs. The reverse search and up arrow key search still only works in my terminal session and then disappears in a new session.

# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
  source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"

source ~/powerlevel10k/powerlevel10k.zsh-theme

# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh

bindkey '^R' history-incremental-search-backward

Solved the issue by reading the arch wiki (because I use endeavoros, btw)

$ autoload -Uz zsh-newuser-install
$ zsh-newuser-install -f

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.