シナリオ:
あなたは毎日の Bash シェルの作業を行っています。前のコマンドを実行したいので、次のように入力します。
history | grep foocommand
foocommand
次に、履歴が追跡されている期間に行ったすべてのことのリストを、次のようなリストで取得します。
585 foocommand --baz --bleet
750 foocommand | grep quux
987 history grep | foocommand
コマンド 585 を実行することにしたので、次のように入力します。
!585
質問:念のために言っておきますが、方程式から最後の一歩を踏み出し、期待される結果を得る方法はありますか? 次のような言い方があればいいのですが。
"grep through history and automatically run the first item on the list"
また
"grep through history and let me choose which item to run using the arrow keys"