Skip to content

Is there a way to disable the up-arrow search history? #792

Answered by ghost
edte asked this question in Q&A

You must be logged in to vote

the readme states how to reset up/down arrow keys to zsh-default: https://github.com/marlonrichert/zsh-autocomplete?tab=readme-ov-file#reset-history-key-bindings-to-zsh-default

It has since been deleted, "Restore Zsh-default functionality" looks really out of place without it

Edit: found the commit

() {
   local -a prefix=( '\e'{\[,O} )
   local -a up=( ${^prefix}A ) down=( ${^prefix}B )
   local key=
   for key in $up[@]; do
      bindkey "$key" up-line-or-history
   done
   for key in $down[@]; do
      bindkey "$key" down-line-or-history
   done
}

All it needs is this. Why it was remove from docs? Yeah, its from that commit. Though, I took it from there. This should solve it.

Replies: 15 comments

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies
Answer selected by marlonrichert

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Converted from issue

This discussion was converted from issue #692 on March 19, 2025 12:26.