Sometimes it's easier to edit your last command in text editor (e.g. vim) than fixing the command line in cli. while bash has fc, fish has built in commands.
fish
go to your previous command with up arrow (or ctrl-p), and press alt-e
make sure $EDITOR environment is set.
$EDITOR
Last updated 3 years ago