LoginSignup
1
1

More than 5 years have passed since last update.

過去に実行したコマンドを蘇生する

Last updated at Posted at 2017-02-07

概要

過去に実行したコマンドを検索して、実行する手順

手順

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 :clap:

追記:Ctrl + rを使用する方法

Ctrl + r を押した後に、文字列を入力すると、過去実行したコマンドが検索&実行できるみたいです!すごい!:clap:

@7of9 さん教えてくれてありがとうございます!

1
1
2

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