If I'm using terminal and typing in a line of text for a command, is there a hotkey or any way to clear/delete that line?
For example, if my current line/command is something really long like:
> git log --graph --all --blah..uh oh i want to cancel and clear this line <cursor is here now>
Is there a hotkey or command to go from the above to:
>
?
Usually I will press the ↓ key, and if my current line is a brand new one on the history, that will clear it. But if I'm going through my command history via the ↑ key and start editing or using those commands, ↓ will only change the prompt to the next newest command in history, so it doesn't work here unless I press ↓ multiple times.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…