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. (但是如果我通过↑键浏览我的命令历史并开始编辑或使用这些命令, ↓只会将提示更改为历史记录中的下一个最新命令,因此除非我多次按↓,否则它不起作用。)
ask by triad translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…