Improve bash history management