Skip to content

Replace history menu with live history search #348

Answered by marlonrichert
jasonvarga asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, that's possible. You'll have to write some code, but it's fairly trivial:

zle -N up-line-or-search
up-line-or-search() {
  if [[ $LBUFFER == *$'\n'* ]] then
    zle up-line
  else
    zle history-incremental-search-backward -w
  fi
}

being able to use fzf is really nice

…except zsh-autocomplete's live history search does not use fzf in any way, shape or from. 🙂

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@jasonvarga
Comment options

@jasonvarga
Comment options

@marlonrichert
Comment options

@jasonvarga
Comment options

Answer selected by jasonvarga
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
documentation Improvements or additions to documentation
2 participants