In bash, how does one clear the current input?

前端 未结 11 2026
礼貌的吻别
礼貌的吻别 2020-12-04 05:56

Suppose in bash you start writing a command like:

$ rm -rf /foo/bar/really/long/path/here

and then realize you don\'t want to execute this

11条回答
  •  伪装坚强ぢ
    2020-12-04 06:24

    If you are using Bash in vi mode (set it with set -o vi), then press Esc to switch to the normal mode of vi, and type dd to delete the current line!

提交回复
热议问题