LoginSignup
1
1

More than 5 years have passed since last update.

peco で history からインクリメンタル検索するやつ

Posted at

.zshrc で以下のように設定してる

# peco で history を検索する
function peco-history-selection() {
    BUFFER=`fc -l -n 1 | tail -10000 | sort | uniq | peco --query "$LBUFFER"`
    CURSOR=$#BUFFER
    zle clear-screen
}

zle -N peco-history-selection
bindkey '^R' peco-history-selection
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1