In bash, how does one clear the current input?

前端 未结 11 2020
礼貌的吻别
礼貌的吻别 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:00

    Pressing Esc plus Backspace in bash will clear everything up to the cursor's position.

    (In Cygwin, this will clear the input up to the next word. Words are separated by spaces, underscores, ...)

提交回复
热议问题