I've noticed that using bash history might be improved by fetching commands executed in current folder. This script is my first approach to do that.
Place xhist.sh file in your home folder.
In .bashrc add line . xhist
fetching whole folder history :
$xhist
Filter commads by keyword :
$xhist keyword