zsh-users
 help / color / mirror / code / Atom feed
From: Perry Smith <pedz@easesoftware.com>
To: zsh-users@zsh.org
Subject: Problems with history on macOS
Date: Wed, 14 Feb 2024 11:08:20 -0600	[thread overview]
Message-ID: <09E1AAC1-45B7-4D53-9028-119BCA5ADCCE@easesoftware.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2424 bytes --]

I’ve been fighting this for a year and I guess I will come to the experts.

I want to have one single giant history file and I can’t seem to get that.  It has hovered around 1500 lines.

In /etc/zshenv I have:

> if [[ -z "$XDG_CONFIG_HOME" ]]
> then
>         export XDG_CONFIG_HOME="$HOME/.config"
> fi
> 
> if [[ -z "$XDG_CACHE_HOME" ]]
> then
>         export XDG_CACHE_HOME="$HOME/.cache"
> fi
> 
> if [[ -d "$XDG_CONFIG_HOME/zsh" ]]
> then
>         export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
> fi

I don’t recall if that is stock macOS or not.  The result is:

> XDG_CACHE_HOME=/Users/pedz/.cache
> XDG_CONFIG_HOME=/Users/pedz/.config
> ZDOTDIR=/Users/pedz/.config/zsh

/Users/pedz/.config/zsh/.zshenv is a symbolic link… sometimes that makes a difference so I’ll mention it.

In there I have (amount other things)

> export SHELL_SESSIONS_DISABLE=1
> export SHELL_SESSION_HISTORY=0


I added the DISABLE line a year ago.

In my login (also symbolically linked) is:

> : ${HISTFILE:=${ZDOTDIR:-$HOME}/.zsh_history}
> SAVEHIST=1048576
> (( HISTSIZE = SAVEHIST * 2 ))

If I do: env|grep SESS I get:

> TERM_SESSION_ID=C5339770-2EA7-49CA-A308-355511F0EE71
> SHELL_SESSIONS_DISABLE=1
> SHELL_SESSION_HISTORY=0

And if I do:  set | grep HIST  I get:

> HISTCHARS='!^#'
> HISTCMD=1585
> HISTFILE=/Users/pedz/.config/zsh/.zsh_history
> HISTSIZE=2097152
> LESSHISTFILE=/Users/pedz/.cache/less/history
> SAVEHIST=1048576
> SHELL_SESSION_HISTORY=0

The absurd 1M and 2M numbers I put out of frustration.

As you can see, my current history is about 1500 lines long.

Here are the pertinent options I have set — many I set explicitly in my login file:

> appendhistory := on
> banghist := on
> cshjunkiehistory := off
> extendedhistory := on
> histallowclobber := off
> histappend := on
> histbeep := on
> histexpand := on
> histexpiredupsfirst := on
> histfcntllock := off
> histfindnodups := on
> histignorealldups := on
> histignoredups := on
> histignorespace := off
> histlexwords := off
> histnofunctions := off
> histnostore := on
> histreduceblanks := on
> histsavebycopy := on
> histsavenodups := on
> histsubstpattern := off
> histverify := off
> incappendhistory := off
> incappendhistorytime := off
> sharehistory := off


Please let me know if you see what I’m doing wrong.

Thank you for your time,
Perry



[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2024-02-14 17:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-14 17:08 Perry Smith [this message]
2024-02-14 23:42 ` Bart Schaefer
2024-04-14 17:57   ` Chris Nebel

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=09E1AAC1-45B7-4D53-9028-119BCA5ADCCE@easesoftware.com \
    --to=pedz@easesoftware.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).