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

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



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