From a7a1cd88940b530c8b599466533d09da47ea4d4b Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sat, 18 Dec 2010 15:24:50 -0500 Subject: bashrc: Unfuck bash history by saving automatically --- dotfiles/bashrc | 9 +++++++++ 1 file changed, 9 insertions(+) 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 -- cgit