Skip to content

Instantly share code, notes, and snippets.

@earonesty
Created September 25, 2018 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save earonesty/819c9f73a66f34d456dae055cb681b7b to your computer and use it in GitHub Desktop.
Save earonesty/819c9f73a66f34d456dae055cb681b7b to your computer and use it in GitHub Desktop.
export PROMPT_COMMAND='if [ "$(id -u)" -ne 0 ]; then echo "$(date "+%Y-%m-%d.%H:%M:%S") $(pwd) $(history 1)" >> ~/.bash.log; fi'
function hh() {
grep "$1" ~/.bash.log
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment