6 ms·
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 ech
by joshstrange 10y 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
- deleted 10y ago[deleted]
- akerro 10y agoThanks so much!