From 1ebc98b9ede5ad5084b3e504e4fc8c01cb93be71 Mon Sep 17 00:00:00 2001 From: Joe Block Date: Sun, 30 Nov 2014 17:37:47 -0800 Subject: Don't clobber HISTSIZE or SAVEHIST if they're already set --- lib/history.zsh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lib/history.zsh') diff --git a/lib/history.zsh b/lib/history.zsh index 1d83e56e3..12dbcf4ee 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 -- cgit v1.2.3-70-g09d2 From 5bf715787a4483cafd70461417cb9a1bf8d1509f Mon Sep 17 00:00:00 2001 From: Joe Block Date: Sun, 30 Nov 2014 17:39:21 -0800 Subject: Existing code indents with spaces, not tabs, conform. --- lib/history.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/history.zsh') diff --git a/lib/history.zsh b/lib/history.zsh index 12dbcf4ee..179c22848 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 -- cgit v1.2.3-70-g09d2 From 1978a0923c864cacdc520adff83ed63f62c91073 Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Mon, 15 Dec 2014 08:11:04 -0800 Subject: Revert PR #3359 as this is breaking stuff for many folks. Need to rethink how we handle system defaults differently on this --- lib/history.zsh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'lib/history.zsh') diff --git a/lib/history.zsh b/lib/history.zsh index 179c22848..e78a98e9e 100644 --- a/lib/history.zsh +++ b/lib/history.zsh @@ -2,12 +2,9 @@ if [ -z "$HISTFILE" ]; then HISTFILE=$HOME/.zsh_history fi -if [ -z "$HISTSIZE" ]; then - HISTSIZE=10000 -fi -if [ -z "$SAVEHIST" ]; then - SAVEHIST=10000 -fi + +HISTSIZE=10000 +SAVEHIST=10000 setopt extended_history setopt hist_expire_dups_first -- cgit v1.2.3-70-g09d2