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

Re: Weird history behavior

On Wed, Jun 8, 2022 at 9:55 AM Adam Cooper <adam@xxxxxxxxxxxxxxxxx> wrote:
> My reading of the docs tells me that (in the absence of /etc/zsh/zshenv) ~/.zshenv is read first, and if ZDOTDIR is set there, the remaining configuration files will be read from ZDOTDIR.

That's correct under the assumption that ZDOTDIR is not already
exported into the environment, but if you export it, then everything
is read from there by child shells, including $ZDOTDIR/.zshenv

> (Moving .zshenv into ZDOTDIR resulted in zsh displaying a menu with options for configuring zsh from the start.)

That's because zsh-newuser-install is looking for some comment lines
in $ZDOTDIR/.zshrc

> Evidence-wise, when I first log in to tty1, HISTFILE is set, as is HISTSIZE (conspicuously set to 9998), so I conclude .zshenv is being read. When I then run startx to enter xmonad, HISTFILE is unset, while HISTSIZE remains set. The only other configuration file, ZDOTDIR/.zshrc, is read correctly.

This sounds like either xmonad is removing HISTFILE from the
environment, or some /etc init file is doing so, and it's not put back
because $HOME/.zshenv is skipped in favor of $ZDOTDIR/.zshenv

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