If you have typed a long command but need to edit it in $EDITOR before executing it: ctrl+x + ctrl+e (Works in BASH out-of-the-box. Can be implemented in ZSH.)
If you have executed a command (e.g. $ echo 'helo world') and need to fix a typo before re-running it: $ ^helo^hello
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
TIL:
fc
Here are some complementary features:
$EDITOR
before executing it:ctrl+x
+ctrl+e
(Works in BASH out-of-the-box. Can be implemented in ZSH.)$ echo 'helo world'
) and need to fix a typo before re-running it:$ ^helo^hello