commandline: Log all bash history with extensive info

When I forget what sequence of commands I used to do a task, I find it
very useful to have this logging, especially because when reviewing the
bash history it's impossible to know from what directories the commands are
run and which ones actually worked.