How do I clear what I typed into the prompt?
Control + A
then Control + K
. The first moves your cursor to the beginning of the line, the second clears the line after the cursor.
A messier way to do this is hit enter and then hit Control + C
. Credit to @billc.cn
If you want to clear the whole prompt, use Control + L
.
Ctrl-U clears the command input you've typed, up to the current cursor position. So if you're using it just after you've typed the command, but haven't moved the cursor back, it'll clear everything you've typed.