Last active
April 7, 2016 13:13
-
-
Save bkozora/38e1c3f570ca35c7bc07 to your computer and use it in GitHub Desktop.
Bash History Modifications
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# Customize our history | |
## | |
# Number of commands stored in current session's history | |
HISTSIZE=5000 | |
# Filesize of ~/.bash_history | |
HISTFILESIZE=10000 | |
# Append instead of overwrite the history | |
shopt -s histappend | |
# Ignore duplicate entries | |
export HISTCONTROL=ignoredups:erasedups:ignorespace | |
# Ignore specific commands | |
export HISTIGNORE="pwd:ls:ls -ltr:history" | |
# Automatically append command to history without requiring the session to end | |
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND" | |
# Display the datetime when the command was executed | |
HISTTIMEFORMAT="%m/%d/%y%r " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment