zimfw/environment

Changes to HISTSIZE and SAVEHIST caused those values to not be set anymore

antoineco opened this issue · 2 comments

Environment:

  • zsh 5.8 (x86_64-ubuntu-linux-gnu)
  • zim 1.4.3

@ericbn After the changes in 4293dd8, the following values are now exported in the environment:

$ echo $HISTSIZE $SAVEHIST
30 0

This is because the values are now only applied if variables don't currently have a value, but those two seem to always be set by Zsh. I tried starting a shell with zsh -f -il, and the same echo command returns the same two values.

Note: this seems to break the zsh-history-substring-search module, which is how I noticed something was wrong.

This StackOverflow conversation seems relevant to the issue: How to view default zsh settings (HISTSIZE, SAVEHIST, …).

HISTSIZE and SAVEHIST being special variables, it is not possible to use the current approach to determine whether the current value is set by the user or by Zsh.

Thanks for this fix, both of you.

These sorts of idiosyncrasies always remind me that Zsh has a TCP server built in: https://zsh.sourceforge.io/Doc/Release/TCP-Function-System.html