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

Re: [RFC PATCH 3/3] FAQ: sync newuser-install



On Thu, Sep 1, 2022 at 10:46 PM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> On 9/2/22, Felipe Contreras <felipe.contreras@xxxxxxxxx> wrote:
> > On Wed, Aug 31, 2022 at 5:28 PM Roman Perepelitsa
> > <roman.perepelitsa@xxxxxxxxx> wrote:
> >> On Wed, Aug 31, 2022 at 11:57 PM Mikael Magnusson <mikachu@xxxxxxxxx>
> >> wrote:
> >> > On 8/30/22, Felipe Contreras <felipe.contreras@xxxxxxxxx> wrote:

> >> > > You may think HISTFILE, SAVEHIST and HISTSIZE are self-explanatory,
> >> > > but the fact is most people need to read the documentation, and even
> >> > > then they end up confused. A few days ago I replied to a person on
> >> > > reddit who had a configuration with HISTSIZE bigger than SAVEHIST.
> >> >
> >> > That is the correct configuration.
> >>
> >> This is my understanding as well. To be more specific, SAVEHIST
> >> greater than HISTSIZE is equivalent to its being equal to HISTSIZE.
> >
> > Only if you are not using APPEND_HISTORY.
>
> Still wrong. SAVEHIST greater than HISTSIZE is always equivalent to
> its being equal to HISTSIZE as we have said repeatedly. If you
> continue to argue otherwise it is surely trolling.

Really?

Please tell me the output of this script:

  #!/bin/zsh

  zmodload zsh/zpty

  export ZDOTDIR=/tmp/zsh
  export HISTFILE=$ZDOTDIR/.history
  export HISTSIZE=2
  export SAVEHIST=10

  mkdir -p $ZDOTDIR
  touch $ZDOTDIR/.zshrc

  for n in $(seq 10); do
  zpty $n zsh

  zpty -w $n <<-EOF
  echo one
  echo two
  exit
  EOF

  zpty -r $n _
  done

  wc -l $HISTFILE

I wonder if you will keep your derogatory tone towards me after running it.

-- 
Felipe Contreras




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