In Windows command line (powershell and cmd), when you press Esc key while on a line, whatever you have typed at the prompt is removed.
I found that pressing
Esc key at bash prompt does nothing. Pressing
Esc and then
backspace deletes a word, but this has to be done for each word.
I am learning Bash incrementally and sometimes type something stupid in the middle of the line and feel that it is better to type from scratch again. To do this, pressing
backspace is the only way I found until now.
What do you do?
I am aware of the
clear command and Ctrl-L shortcut, but I am not talking about clearing the entire terminal. Just the line.