22nd August
2009
Have you ever started writing a one-liner and half way in realized it was a bit more complex than you first thought?
If your shell is bash, next time that happens try ctrl-x ctrl-e.
It will take your current line and stuff it into the your default editor (export EDITOR=vim).
Identica
Twitter
LinkedIn
It seems that it depends on the shell. Works in bash, but not in zsh.
Thanks, I didn’t think to specify I use the bash shell.
If you’re using vi-mode keybindings for your prompt, then hit escape to be in command mode and then v and it opens $EDITOR in the same way.
Thanks for that!
Dear god man I’m trapped in emacs!