https://github.com/peco/peco
linuxのコマンド履歴検索は、Ctrl-R , Ctrl-S を利用していますが、pecoを利用すると、はかどるみたい。
install peco
2015/9時点の最新版 peco_linux_amd64.tar.gz ver.0.33 のバイナリ版は、私のcentos環境で動作しなかった為、古いverを利用しています
$ wget https://github.com/peco/peco/releases/download/v0.1.12/peco_linux_amd64.tar.gz $ tar -zxvf peco_linux_amd64.tar.gz $ su $ cp peco_linux_amd64/peco /usr/local/bin/
config peco
$ vi ~/.bash_profile export HISTCONTROL=ignoreboth:erasedups #export HISTIGNORE="fg*:bg*:history*:wmctrl*:exit*:ls -al:cd ~" # settings for peco _replace_by_history() { local l=$(HISTTIMEFORMAT= history | sed -e 's/^\s*[0-9]*\s*//' | perl -ne 'print unless $seen{$_}++' | peco --query "$READLINE_LINE") READLINE_LINE="$l" READLINE_POINT=${#l} } bind -x '"\C-r": _replace_by_history' bind '"\C-xr": reverse-search-history'