historian is a command-line utility for managing shell history using an SQLite database.
~/.bash_history is deduped and imported into a database.
-
Add to
PATHexport PATH="$PATH:/Users/jerry/historian"Alternatively, you can set up an alias for it
alias hist="/Users/jerry/historian/hist" -
Add
hist importto your.profile(assuminghistis already in your path):echo hist import >> ~/.profileThis will import your
.bash_historyevery time you launch a new shell.
-
Show config
hist config -
Search (detailed)
hist search nvm -
Search (shorthand)
hist /nvm -
View log
hist log
- Live like your db file could be corrupted at any time.
- Be careful of running specially crafted hist commands against
~/.bash_historyfiles.