From 1ebc98b9ede5ad5084b3e504e4fc8c01cb93be71 Mon Sep 17 00:00:00 2001 From: Joe Block Date: Sun, 30 Nov 2014 17:37:47 -0800 Subject: [PATCH 1/2] Don't clobber HISTSIZE or SAVEHIST if they're already set --- lib/history.zsh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/history.zsh b/lib/history.zsh index 1d83e56e..12dbcf4e 100644 --- a/lib/history.zsh +++ b/lib/history.zsh @@ -1,9 +1,13 @@ ## Command history configuration -if [ -z $HISTFILE ]; then +if [ -z "$HISTFILE" ]; then HISTFILE=$HOME/.zsh_history fi -HISTSIZE=10000 -SAVEHIST=10000 +if [ -z "$HISTSIZE" ]; then + HISTSIZE=10000 +fi +if [ -z "$SAVEHIST" ]; then + SAVEHIST=10000 +fi setopt extended_history setopt hist_expire_dups_first From 5bf715787a4483cafd70461417cb9a1bf8d1509f Mon Sep 17 00:00:00 2001 From: Joe Block Date: Sun, 30 Nov 2014 17:39:21 -0800 Subject: [PATCH 2/2] Existing code indents with spaces, not tabs, conform. --- lib/history.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/history.zsh b/lib/history.zsh index 12dbcf4e..179c2284 100644 --- a/lib/history.zsh +++ b/lib/history.zsh @@ -3,10 +3,10 @@ if [ -z "$HISTFILE" ]; then HISTFILE=$HOME/.zsh_history fi if [ -z "$HISTSIZE" ]; then - HISTSIZE=10000 + HISTSIZE=10000 fi if [ -z "$SAVEHIST" ]; then - SAVEHIST=10000 + SAVEHIST=10000 fi setopt extended_history