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

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



On 2022-08-31 12:36:06 -0700, Bart Schaefer wrote:
> On Wed, Aug 31, 2022 at 5:34 AM Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> >
> > On 2022-08-30 14:31:30 -0500, Felipe Contreras wrote:
> > > Yes, but "we" are zsh veterans. We don't need a simpler .zshrc, but
> > > newcomers do.
> >
> > Having a too simple .zshrc file is not helping them. Rather than
> > hidden defaults, I think that it is better to have explicit values
> > in some default .zshrc file, so that it is easier to change them.
> 
> We've made several stabs at this without ever coming to a resolution.
> The most recent attempt was in spring 2021 (search archives for
> subject "Rewrite of zsh-newuser-install").
> 
> There have always been 3 problems:
>  * Supplying a default file leads to package maintainers shoving it
> into /etc, despite admonitions to the contrary

Perhaps it should first check that the owner of the file corresponds
to $UID.

>  * A small well-documented file is easy to understand and edit, but ...
>  * ... others want the default file to enable and configure all the
> cool/powerful features
> 
> Consequently we go round in circles and end up changing nothing.

Provide a minimal .zshrc and an additional .zshrc-extra, where
the .zshrc file ends with

# Uncomment to configure extra features (or copy such features here)
#source .zshrc-extra

> > I currently use HISTSIZE=8000 SAVEHIST=8000, and while this value
> > is OK on some machines, I've noticed that I sometimes lose commands,
> > and indeed, after a look, this gives me only a 12-day history on my
> > main machine, while I would have thought that it would be several
> > weeks (I wish I could set a minimum time limit for the history).
> 
> That's actually not a bad idea, and would probably work well in
> conjunction with HIST_SAVE_NO_DUPS.  Would require EXTENDED_HISTORY.

Or SHARE_HISTORY?

I do not use HIST_SAVE_NO_DUPS because it breaks
accept-line-and-down-history.

I use INC_APPEND_HISTORY (together with EXTENDED_HISTORY). So the
history lines are already sorted by time.

> > And there's more than the history. I suspect that many users would
> > like "bindkey -e", a better prompt and better completions than the
> > default.
> 
> Cf. "all the cool/powerful features" ...
> 
> (Isn't "bindkey -e" already the default?  Is this just to overcome
> having EDITOR=vim or some such?)

Unfortunately, it isn't (at least not with "zsh -f", for which the
only possibility is to type "bindkey -e").

BTW, the manual says:

  Emacs editing mode is probably more natural for beginners and
  can be selected explicitly with the command bindkey -e.

Since it is probably more natural for beginners, why isn't it the
default?

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)




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