Opening Terminal Commands in Editor
When editing a command in Terminal, you can type Control-X, Control-E to open it in your text editor of choice (via Wesley Darlington). When you save your changes and close the document, the command is executed.
I have my editor set to BBEdit via this line in ~/.bash_profile:
export EDITOR="bbedit -w"
5 Comments RSS · Twitter
I think this is more a bash feature than a Terminal feature. For example, the fish shell doesn't (yet) support this behavior. Thanks for pointing out `bbedit -w` though; not knowing about that option has kept me from using it as my `$EDITOR` before.
Ctrl-X, Ctrl-E? Hm...
Open Keyboard Maestro, new Macro, available in Terminal, Triggered by ⌘E, Simulate Keystroke ^X, Simulate Keystroke ^E.
Awesome! :-)