Comment by tpoacher

Comment by tpoacher 4 days ago

1 reply

I don't know if the author is already aware of this or not, but there's actually already a readline / bash two-keystroke shortcut, ^X^E, for doing just that: drop into a terminal editor, with the current state of your command becoming the first line in the buffer, which then executes the command upon exit from the editor. (obviously, while you're in the editor, you can save to a file first instead of just exiting directly, if you think the current command has re-use value)

tasuki 4 days ago

In zsh with vim mode, the shortcut to open current command in editor is `v`.