Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH 1/2] Set SAVEHIST to $HISTSIZE by default



If they are the same, this makes it clearer that they are the same.

Signed-off-by: Felipe Contreras <felipe.contreras@xxxxxxxxx>
---
 Etc/FAQ.yo                            | 2 +-
 Functions/Newuser/zsh-newuser-install | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Etc/FAQ.yo b/Etc/FAQ.yo
index 8c795685a..dd573767e 100644
--- a/Etc/FAQ.yo
+++ b/Etc/FAQ.yo
@@ -1631,7 +1631,7 @@ label(321)
   verb(
     HISTSIZE=200
     HISTFILE=~/.zsh_history
-    SAVEHIST=200
+    SAVEHIST=$HISTSIZE
   )
   tt($HISTSIZE) tells the shell how many lines to keep internally,
   tt($HISTFILE) tells it where to write the history, and tt($SAVEHIST),
diff --git a/Functions/Newuser/zsh-newuser-install b/Functions/Newuser/zsh-newuser-install
index 9e911d07c..386844a71 100644
--- a/Functions/Newuser/zsh-newuser-install
+++ b/Functions/Newuser/zsh-newuser-install
@@ -792,7 +792,7 @@ __zni_history_config() {
   __zni_apply_defaults -p \
     HISTSIZE 1000 "Number of lines of history kept within the shell." \
     HISTFILE $zdmsg/.histfile "File where history is saved." \
-    SAVEHIST 1000 "Number of lines of history to save to \$HISTFILE."
+    SAVEHIST \$HISTSIZE "Number of lines of history to save to \$HISTFILE."
 
   if __zni_display_and_edit "History configuration"; then
     install_state[history]="Unsaved changes"
-- 
2.37.2.351.g9bf691b78c.dirty





Messages sorted by: Reverse Date, Date, Thread, Author