News for hackers. Stuff that matters.
Re:Store your zsh history into a sqlite3 database by wingerlang on Friday August 18, 2017 @03:12AM (#15044184)
I use this:

> export PROMPT_COMMAND='if [ "$(id -u)" -ne 0 ]; then echo "$(date "+%Y-%m-%d.%H:%M:%S") $(pwd) $(history 1)" >> ~/.logs/bash-history-$(date "+%Y-%m-%d").log; fi'

It just logs everything into files per date, have come in handy at times.

There are no comments on this comment yet.