Skip to content

Commit 20d156c

Browse files
authored
bashrc history command options
1 parent b84c58a commit 20d156c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

bashrc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,18 @@ export EDITOR='vim'
3737

3838
export LESS=RSJwij.3
3939

40+
41+
# Command line history:
42+
# Append to the history file, don't overwrite it
43+
shopt -s histappend
44+
# Save after each command
4045
if [[ $PROMPT_COMMAND != *"history -a"* ]]; then
4146
export PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
4247
fi
43-
HISTSIZE=10000
48+
# Ignore repeated entries, and set in memory and in file limits.
49+
HISTCONTROL=ignoredups
50+
HISTSIZE=2000
51+
HISTFILESIZE=2000
4452

4553
# Remove call to update_terminal_cwd if it doesn't exist.
4654
# (it is defined by Mac OSX etc/bashrc, but not if terminal is screen)

0 commit comments

Comments
 (0)