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 48464
- From: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Oliver Kiddle <opk@xxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Rewrite of zsh-newuser-install (Mikael's subthread)
- Date: Sat, 10 Apr 2021 09:44:59 +0200
- Archived-at: <https://zsh.org/workers/48464>
- In-reply-to: <CAH+w=7bDtE5gPONTbDzEF-0nVwt5ptkwZJy36nVsY7Mh-fKE0g@mail.gmail.com>
- 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> <CAH+w=7bDtE5gPONTbDzEF-0nVwt5ptkwZJy36nVsY7Mh-fKE0g@mail.gmail.com>
On Sat, Apr 10, 2021 at 1:08 AM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> 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?
FWIW, this is what I've done in zsh4humans. An attempt to source
.zshrc results in an error message with a suggestion to use `exec
zsh`. It doesn't actually run the command so users who understand the
subtleties can run something else. This has worked well so far. I
regularly receive bug reports against powerlevel10k from users who run
`source .zshrc` and expect the same results as if they restarted zsh
but I never get those from zsh4humans users.
Roman.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author