I do this a lot:
user@machine: $ ls'
>
# Me: Argh! I did it again!
>'
: No such file or directory
Basically, I finish typing a command, and hit ' by accident when trying to hit enter, and end up with an un-closed single-quote. I can't get back up to the previously line to delete it, so end up just running the command with a syntax error.
Is there a way to recover this and fix my command?