memorandum

IT技術の習得を記録します

itermでcontrol+rでコマンド履歴を検索する設定方法 

このコマンドを打った後に、

brew install peco

.zshrc以下に下記を追記する

function peco-select-history() {
    local tac
    if which tac > /dev/null; then
        tac="tac"
    else
        tac="tail -r"
    fi
    BUFFER=$(\history -n 1 | eval $tac | awk '!a[$0]++' | peco --query "$LBUFFER")
    CURSOR=$#BUFFER
    zle clear-screen
}
zle -N peco-select-history

bindkey '^r' peco-select-history

itermの設定

https://github.com/robbyrussell/oh-my-zsh

Basic Installation

Oh My Zsh is installed by running one of the following commands in your terminal. You can install this via the command-line with either curl or wget.

via curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"