-
Notifications
You must be signed in to change notification settings - Fork 1
/
.bashrc_history
28 lines (26 loc) · 1.18 KB
/
.bashrc_history
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
###############################
### bash history
###############################
# installation
# scp ~/dotfiles/.bashrc_history host:~/.bashrc_history
# ssh host 'echo . .bashrc_history >>.bashrc'
#
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
# export HISTSIZE=-1 # breaks gdb
export HISTSIZE=10000
export HISTFILESIZE=5000000
export HISTCONTROL=ignoreboth:erasedups # no duplicate entries
# trick from http://unix.stackexchange.com/questions/48111/real-time-history-export-amongst-bash-terminal-windows#3055135
# append to the history file, don't overwrite it
shopt -s histappend # append to history, don't overwrite it
# 10000 unique bash history lines that are shared between
# sessions on every command. Happy ctrl-r!!
# Save and reload the history after each command finishes
#export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
#HISTCONTROL=ignoreboth
# alt-n/alt-p history-search-backwad/forward'
bind '"\ep":history-search-backward'
bind '"\en":history-search-forward'
# ~/.bashrc: executed by bash(1) for non-login shells.