[Git-commits] [grml/grml-etc-core] 96cc70: zshrc: set HISTSIZE + SAVEHIST only if not yet set...

Michael Prokop noreply at github.com
Wed Dec 18 21:39:01 CET 2024


  Branch: refs/heads/mika/zshhist
  Home:   https://github.com/grml/grml-etc-core
  Commit: 96cc70e647b6f3b3b83d68e3e23b74162463daaf
      https://github.com/grml/grml-etc-core/commit/96cc70e647b6f3b3b83d68e3e23b74162463daaf
  Author: Michael Prokop <mika at grml.org>
  Date:   2024-12-18 (Wed, 18 Dec 2024)

  Changed paths:
    M doc/grmlzshrc.t2t
    M etc/zsh/zshrc

  Log Message:
  -----------
  zshrc: set HISTSIZE + SAVEHIST only if not yet set or being set to zsh upstream default

In commit 7465ffb0803b0eb05d808b850088e90572c8dacd
we adjusted the behavior when HISTSIZE and/or SAVEHIST are unset.
Though this broke existing setups where HISTSIZE and SAVEHIST was not
yet set (like in /etc/profile.d as reported in #160), as zsh sets
HISTSIZE and SAVEHIST by default:

  config.h.in:#define DEFAULT_HISTSIZE 30
  configure.ac:#define DEFAULT_HISTSIZE 30

So `zsh -f` defaults to $HISTSIZE of 30 and $SAVEHIST of 0,
Now we clearly want to ship better defaults than this.
Do this, by checking whether is HISTSIZE is unset or set to the upstream
default (being 30), only then set HISTSIZE and SAVEHIST.

In commit 81096c8f57c088163cfcea49f2eb03b4b44c66fd
we increased HISTSIZE + SAVEHIST also for our live system usage,
re-apply this change.

Closes: https://github.com/grml/grml-etc-core/issues/160 and
Closes: https://github.com/grml/grml-etc-core/issues/169



To unsubscribe from these emails, change your notification settings at https://github.com/grml/grml-etc-core/settings/notifications


More information about the Git-commits mailing list