This is pretty slick: enter “
fc” in the shell and your last command opens up for editing in your default editor (as given by “
$EDITOR“). Works perfectly with vi. The”
$EDITOR” variable approach does not seem to work with BBEdit though, and you have to:
$ fc -e '/usr/bin/bbedit --wait'
With vi, “
:cq” aborts execution of the command.