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

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



On Thu, Aug 25, 2022 at 6:13 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> On Thu, Aug 25, 2022 at 3:44 PM Felipe Contreras
> <felipe.contreras@xxxxxxxxx> wrote:
> >
> > This is *less* complicated:
>
> Every addition of an option to change the way something works is
> making the shell as a whole more complicated and the interactions
> among the settings more difficult to explain and understand.

That isn't true. That would be like saying every commit makes the code
more complicated. Some commits do, sure, but not all.

There are commits specifically designed to *reduce* complexity, and
such changes are called refactoring.

Options can be refactored too. Some changes in options can actually
make multiple options unnecessary, thus reducing complexity. Others
can simplify the explanation.

This:

  sect(Why is my history not being saved?)
  label(321)

    In zsh you need to specifically enable history:
    verb(
      setopt SAVE_HISTORY
    )

Is simpler than this:

  sect(Why is my history not being saved?)
  label(321)

    In zsh, you need to set three variables to make sure your history is
    written out when the shell exits.  For example,
    verb(
      HISTSIZE=200
      HISTFILE=~/.zsh_history
      SAVEHIST=200
    )
    tt($HISTSIZE) tells the shell how many lines to keep internally,
    tt($HISTFILE) tells it where to write the history, and tt($SAVEHIST),
    the easiest one to forget, tells it how many to write out.  The
    simplest possibility is to set it to the same as tt($HISTSIZE) as
    above.  There are also various options affecting history; see the
    manual.

Moreover, not all options nor all interactions need to be explained.

There's a minimum set of options which are necessary to explain in
order to make zsh useful to most people though. It is in the best
interest of every user of zsh that these minimum options are as few as
possible and as simple to explain as possible.

Why would we intentionally make things harder for most new users?

Cheers.

-- 
Felipe Contreras




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