From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: Re: [PATCH 1/2] Set SAVEHIST to $HISTSIZE by default
Date: Fri, 2 Sep 2022 08:59:04 +0000 [thread overview]
Message-ID: <20220902085904.GF5920@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <20220831031854.27312-2-felipe.contreras@gmail.com>
Felipe Contreras wrote on Tue, Aug 30, 2022 at 22:18:53 -0500:
> If they are the same, this makes it clearer that they are the same.
>
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
> 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
Personally, I'm not going to commit this since I find the increased
semantic precision / DRY compliance to be outweighed by the reduced
readability (both here and in the code below, but for different
reasons).
> )
> 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"
next prev parent reply other threads:[~2022-09-02 8:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-31 3:18 [PATCH 0/2] Useful default of HISTSIZE Felipe Contreras
2022-08-31 3:18 ` [PATCH 1/2] Set SAVEHIST to $HISTSIZE by default Felipe Contreras
2022-09-02 8:59 ` Daniel Shahaf [this message]
2022-09-02 9:29 ` Felipe Contreras
2022-09-02 10:01 ` Daniel Shahaf
2022-09-02 13:25 ` Felipe Contreras
2022-09-06 20:13 ` Felipe Contreras
2022-08-31 3:18 ` [PATCH 2/2] Increase default HISTSIZE to 1000 Felipe Contreras
2022-09-02 9:01 ` Daniel Shahaf
2022-09-02 9:49 ` Felipe Contreras
2022-08-31 3:39 ` [PATCH 0/2] Useful default of HISTSIZE Lawrence Velázquez
2022-08-31 5:57 ` Felipe Contreras
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220902085904.GF5920@tarpaulin.shahaf.local2 \
--to=d.s@daniel.shahaf.name \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).