|
|
|
|
|
by joshstrange
3673 days ago
|
|
Just for those out there using zsh or fish I used to following in my .zshrc to get this working: precmd() {
eval 'if [ "$(id -u)" -ne 0 ]; then echo "$(date "+%Y-%m-%d.%H:%M:%S") $(pwd) $(history | tail -n 1)" >>! ~/Dropbox/Logs/Bash/Macbook/bash-history-$(date "+%Y-%m-%d").log; fi'
}
I Store my logs in dropbox but you can put them wherever |
|