4 ms·
On more handy set of emacs-derived keystrokes: Ctrl-a ctrl-k to clear the current command, or redo a hidden password prompt if you know you fat-fingered it. c
by mceachen 7y ago
On more handy set of emacs-derived keystrokes:
Ctrl-a ctrl-k to clear the current command, or redo a hidden password prompt if you know you fat-fingered it.
ctrl-a jumps the cursor to the beginning of the line, and ctrl-k deletes from current position to the end of the line.
The mnemonic to remember these: "a" is the first position in the alphabet, and jumps you to the first position. "K" is short for "kill.”
- wazoox 7y agoCtrl-u (delete everything from the cursor to the beginning of line) is one less stroke for the very same result :)
- usrme 7y agoCtrl+U is also really handy for clearing password (or any other input) lines where you know you made a mistake, but don't want to just spam Backspace until you think you've gotten to the beginning.
- Axsuul 7y agoAny ideas why ctrl+k doesn't work in my iTerm2? All other readline shortcuts work.