zsh-users
 help / color / mirror / code / Atom feed
From: Adam Cooper <adam@theadamcooper.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re: Weird history behavior
Date: Wed, 8 Jun 2022 12:55:28 -0400	[thread overview]
Message-ID: <20220608165528.suhoqmhgo3qbkhq7@marcos.localdomain> (raw)
In-Reply-To: <CAH+w=7bzCH5jzVszH9wb0qfA+PhhVwUuJTOMUJXuE0eQJJQ+=g@mail.gmail.com>

On Jun 07 10:02PM, Bart Schaefer wrote:
>On Tue, Jun 7, 2022 at 12:24 PM Adam Cooper <adam@theadamcooper.com> wrote:
>>
>> After installing xmonad on an Arch Linux system, my zsh history has begun to misbehave. HISTFILE is read from .zshenv after logging into the console, but once I start xmonad and a terminal, HISTFILE is empty.
>[...]
>> Here is a link to my .zshenv: https://git.theadamcooper.com/adam/dotfiles/src/branch/master/arch/zsh/.zshenv
>
>Well, there's this:
>export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
>
>Once that's in the environment, $HOME/.zshenv isn't going to be read
>any more, rather, the dot-files in $ZDOTDIR are going to be read
>instead ... so you should look there.

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. (Moving .zshenv into ZDOTDIR resulted in zsh displaying a menu with options for configuring zsh from the start.)

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.


  reply	other threads:[~2022-06-08 16:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-07 19:23 Adam Cooper
2022-06-08  5:02 ` Bart Schaefer
2022-06-08 16:55   ` Adam Cooper [this message]
2022-06-08 16:58     ` Roman Perepelitsa
2022-06-08 17:03     ` Bart Schaefer
2022-06-08 17:07     ` Bart Schaefer

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=20220608165528.suhoqmhgo3qbkhq7@marcos.localdomain \
    --to=adam@theadamcooper.com \
    --cc=zsh-users@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).