Skip to content

Instantly share code, notes, and snippets.

@shawn-sterling
Created September 20, 2013 00:35
Show Gist options
  • Save shawn-sterling/6631845 to your computer and use it in GitHub Desktop.
Save shawn-sterling/6631845 to your computer and use it in GitHub Desktop.
handy history file
# cat histfile.sh
export HISTFILE=~/.bash_history_$(who -m |awk '{print $1}')
export HISTSIZE=9999
export HISTFILESIZE=999999
export HISTCONTROL=''
export HISTIGNORE=''
export HISTTIMEFORMAT='%F %T %Z '
export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND ; }"'history -a'
readonly HISTFILE
readonly HISTFILESIZE
readonly HISTSIZE
readonly HISTCONTROL
readonly HISTIGNORE
readonly HISTTIMEFORMAT
readonly PROMPT_COMMAND
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment