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

Re: Rewrite of zsh-newuser-install (Mikael's subthread)



On Fri, Apr 9, 2021 at 3:04 PM Oliver Kiddle <opk@xxxxxxx> wrote:
>
> Marlon wrote:
> >
> > The problem is that many new users have learned from OMZ and other
> > sources that they should do `source ~/.zshrc` to apply changes.

Which is somewhat cringey for a number of out-of-scope reasons.

> > originally had a note that said you should instead either restart your
> > terminal or type `exec zsh`, but then Oliver & Bart came up with the
> > current solution.
>
> Would it be better if we put the zrestart function in Functions/Misc

That doesn't address whether we should employ $- or a conditional to
find flags to pass to the restarted shell, nor does it address
Arseny's concern about a shell in the "chain" having a nonzero exit
status.  (If use of the PID space is really an issue, the user is
restarting WAY too often.)

I somewhat hesitantly suggest (because I don't have a clear
implementation in mind yet) that perhaps the .zshrc should set a
variable to record that it has been run, and employ some conditional
test(s) to deal with being source'd a second+ time?




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