Generally i use several terminals at the same time, generally one per project or task, i’ve always been annoyed that i either loose history or it becomes hard to find so i created hiset (history set) pronounced hi-set. It allows you to easily assign a history per shell sessions and then manage the multiple history files . Hiset works by modifying the HISFILE environment variable meaning that the history command works as usual within the session.

Using hiset

Installation is simple get a copy of the file from then source it in your .bashrc or /etc/profile.d/:


below is the output for “hiset -s git” it shows i have several history files with git in them, there is some other screenshots at the bottom
Searching through hiset's history


It also has a HISET environment variable that you can add to your prompt with:

PS1="$PS1 $(echo $HISET)"

I’ve been tinkering with prompts in bash over the last few weeks as well and mine is now considerably more advanced its based off
which has some cool git integration.