I sometimes want to make small edits to small file from within the shell I'm working in, while looking at my command history.
As an example, if I want to write a short shell script after experimenting on the command line, I can do:
cat > example.sh
and work from what I can see.
But cat's not the best editor. If I use vi or emacs though (as far as I can tell) the whole environment changes, and I can only see what I've been doing is if I run the shell history command from inside the editor, which isn't really what I want either.
I realise this is really nit-picky, but does anyone have any suggestions for a sensible editor (or way of using a sensible editor) that I can quickly invoke from the command-line and doesn't spawn its own environment?