LoginSignup
8
7

More than 5 years have passed since last update.

pecoを使って、コマンド履歴をインクリメンタルに絞り込んでコマンド再実行

Last updated at Posted at 2014-07-02

oWtmj9P7Ki.gif

Ctrl - rですぐに見つけられないときに便利
- 追記:末尾により理想的な解決へのリンク追加

pecoのインストール

# homebrew

brew install peco

# or 

go get github.com/peco/peco/cmd/peco

実行方法

# 下記をコピペしてenter

eval $(history | cut -c 8-|peco)

aliasに登録

# テキトーにcrとした

alias  cr='eval $(history | cut -c 8-|peco)'

Ctr-rのように過去コマンドを編集して実行したいとき

そのままズバリのやり方を見つけた

8
7
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
8
7