Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
Bash history optimized settings
SUBMITTED BY:
Guest
DATE:
Feb. 5, 2015, 8:58 a.m.
FORMAT:
Bash
SIZE:
499 Bytes
Raw
Download
Tweet
HITS:
710
Go to comments
Report
# Avoid duplicates, ignore two characters commands and those ones which starts with
# a space. Preserve history in multiple terminal windows.
export
HISTCONTROL
=
ignoredups:erasedups
export
HISTCONTROL
=
ignoreboth
export
HISTCONTROL
=
ignorespaces
export
HISTIGNORE
=
??
# After each command, append to the history file and reread it
export
PROMPT_COMMAND
=
"
${
PROMPT_COMMAND
:+
$PROMPT_COMMAND
$'\n'
}
history -a; history -c; history -r"
shopt
-s
histappend
shopt
-s
checkwinsize
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus