LoginSignup
27
23

More than 5 years have passed since last update.

【これでらくらく】ターミナルで途中まで入力していたコマンドを全部消したくなった時

Last updated at Posted at 2014-03-19

ターミナルで例えば

$ hogehoge kantoiitenkidesu

と入力している途中で、先に実行したいコマンドが出た時
"delete" を 25 回押して消していたが、

esc + delete

とすると一括で消せる。
(Ctrl + c でも目的は達成できますが。。。)

Mac と Ubuntu で確認しています。

--- 追記 ---
gm_kou さんからコメント頂ました。
どうやら

Ctrl + u

で全消しが出来るようようです。
また、これは一時的に保存されているようで

Ctrl + y

を押すと復元できます。

つまり、長いコマンドを入力中にふと、ファイルの編集をしたくなっても悩み無用です。

27
23
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
27
23