🫥

時短系コマンド

2023/12/16に公開

Historyから検索する

history|grep 検索する単語

例:

history|grep rails

結果

~~~~~
243  rails s -e production
248  rails s -e production
256  history|grep rails

過去に打ったコマンドをサクッと打つ

$ !コマンドの連番

例:以下のコマンドの243番目をもう一度打ちたい

~~~~~
243  rails s -e production
248  rails s -e production
256  history|grep rails

下記のように実行

$ !243

Discussion