There are many answers pointing out that I can cut (kill) text in the terminal with ctrl+u like this one of Stack Overflow
I often feel it is inconvenient to use ctrl+u. Imagine this scenario:
longlonglonglonglonglonglong
wrongwrongwrongwrongwrongwrong
I need ctrl+u, but also need another command to only delete, not cut.
If you don't need to paste command B anywhere later, you can do this:
While on point 3 in your list, you can type CTRL+C. This will abort the command you are currently typing and you get a new clean prompt:
$ foofooofoofoo^C
$
If you do need command B later, you can make use of the "middle-button-paste". To do this, you can select the text with the mouse and later paste it by clicking the mouse wheel or both mouse buttons simultaneously.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments