diff options
author | Colin Walters <walters@verbum.org> | 2010-12-18 15:24:50 -0500 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2011-03-25 11:06:51 -0400 |
commit | a7a1cd88940b530c8b599466533d09da47ea4d4b (patch) | |
tree | 0577c41aff1baa159efc4f12197cab735d64aafe /dotfiles/bashrc | |
parent | 2a0789040d4811cd747fcc7f98c2c73ce3a00b5a (diff) | |
download | homegit-MOVED-TO-GNOME-a7a1cd88940b530c8b599466533d09da47ea4d4b.tar.gz homegit-MOVED-TO-GNOME-a7a1cd88940b530c8b599466533d09da47ea4d4b.tar.xz homegit-MOVED-TO-GNOME-a7a1cd88940b530c8b599466533d09da47ea4d4b.zip |
bashrc: Unfuck bash history by saving automatically
Diffstat (limited to 'dotfiles/bashrc')
-rw-r--r-- | dotfiles/bashrc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/dotfiles/bashrc b/dotfiles/bashrc index 03b3b69..472a267 100644 --- a/dotfiles/bashrc +++ b/dotfiles/bashrc @@ -11,8 +11,17 @@ if [ -f /etc/bash_completion ]; then . /etc/bash_completion fi +HISTSIZE=5000 +export HISTSIZE shopt -s histappend +UNFUCK_BASH_HISTORY="history -a" +if test -z "$PROMPT_COMMAND"; then + PROMPT_COMMAND="$PROMPT_COMMAND;$UNFUCK_BASH_HISTORY" +else + PROMPT_COMMAND="$UNFUCK_BASH_HISTORY" +fi + EDITOR="emacsclient" export EDITOR |