Skip to content

Instantly share code, notes, and snippets.

@joshenders
Created May 15, 2012 01:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshenders/2698491 to your computer and use it in GitHub Desktop.
Save joshenders/2698491 to your computer and use it in GitHub Desktop.
environment variables relating to .bash_history
# Unset bounds on history file. Disk is cheap, unlimited is fine until it's not
# and then rotate
export HISTFILESIZE=
export HISTSIZE=
# Add timestamps to .bash_history
# TODO: find someway to store the current working directory for forensics
export HISTTIMEFORMAT="%d/%m/%y %T "
# The "ignoreboth" setting ignores repeated lines as well as silently discards
# lines beginning with a space for privacy. Equivalent to 'ignoredups' and
# 'ignorespace'
export HISTCONTROL=ignoreboth
# Commands to not log in history
export HISTIGNORE=ls:cd
# If set, the history list is appended to the file named by the value of the
# HISTFILE variable when the shell exits, rather than overwriting the file.
shopt -s histappend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment