summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2010-12-18 15:24:50 -0500
committerColin Walters <walters@verbum.org>2011-03-25 11:06:51 -0400
commita7a1cd88940b530c8b599466533d09da47ea4d4b (patch)
tree0577c41aff1baa159efc4f12197cab735d64aafe
parent2a0789040d4811cd747fcc7f98c2c73ce3a00b5a (diff)
downloadhomegit-MOVED-TO-GNOME-a7a1cd88940b530c8b599466533d09da47ea4d4b.zip
homegit-MOVED-TO-GNOME-a7a1cd88940b530c8b599466533d09da47ea4d4b.tar.gz
homegit-MOVED-TO-GNOME-a7a1cd88940b530c8b599466533d09da47ea4d4b.tar.xz
bashrc: Unfuck bash history by saving automatically
-rw-r--r--dotfiles/bashrc9
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