When I try to read bash history into vim, I get nothing.
:r !history
If I just execute the command, i.e.
:!history
:r!echo "history" | bash -i 2>/dev/null | sed -e 's/\x1b\[.//g'
The history command only works on interactive shell.
The first part:
echo "history" | bash -i 2>/dev/null
Forces interactive shell (and removes lines which aren't output of history).
The second part:
sed -e 's/\x1b\[.//g'
Removes escape character the shell might output (happened on my system).