【Bash】history + peco | 高木のブログ

history + peco で過去のコマンドを検索しやすいようにした function peco_search_history() { local l=$(HISTTIMEFORMAT= history | \ sort -r | sed -E s/^\ *[0-9]\+\ \+// | \ peco --query "$READLINE_LINE") READLINE_LINE="$l" READLINE_POINT=${#l} } bind -x '"\C-r": peco_search_history' Ctrl + R …