概要
過去に実行したコマンドを検索して、実行する手順
手順
history 100 #100行の過去を表示
↓こんなん表示されます。
99 bundle install --without production
100 cd sample_app/
101 bundle install --without production
102 git init
103 git add .
104 git commit -m "Initialize REPO"
105 git mv README.rdoc README.md
106 git commit -am "Improve the README"
107 git remote add origin git@github.com:ksyunnnn/RailsTutorial_SampleApp.git
108 git push -u origin -all
109 git push -u origin --all
110 git add .
111 git commit
112 cd sample_app_/
113 ll
114 view config/routes.rb
115 vi app/views/static_pages/home.html.erb
116 history 100
![番号] # 指定した番号のコマンドを実行
なんて簡単。素晴らC
追記:Ctrl + r
を使用する方法
Ctrl + r
を押した後に、文字列を入力すると、過去実行したコマンドが検索&実行できるみたいです!すごい!
@7of9 さん教えてくれてありがとうございます!