Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Rewrite of zsh-newuser-install (Mikael's subthread)
- X-seq: zsh-workers 48454
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Oliver Kiddle <opk@xxxxxxx>
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Rewrite of zsh-newuser-install (Mikael's subthread)
- Date: Fri, 9 Apr 2021 16:08:24 -0700
- Archived-at: <https://zsh.org/workers/48454>
- In-reply-to: <85321-1618005842.162070@01py.d8bG.-OTF>
- List-id: <zsh-workers.zsh.org>
- References: <CAHYJk3Sh8ErYyObh=nURosOnj4+bsB1WsxhOi_-e=n_1fjAQ6Q@mail.gmail.com> <E9B97A4D-3406-449E-86FD-6CC5DFC21935@gmail.com> <CAHYJk3RUX6MyFB7o2WFE=P0-=QQ=gv49Z3VTyu+9Zm9fzmoB4A@mail.gmail.com> <F9A77ABF-D672-40F4-90DC-985DE26D1A90@gmail.com> <85321-1618005842.162070@01py.d8bG.-OTF>
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