Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There is a system-wide /etc/profile or /etc/profile.d/

Likewise, zsh will look for /etc/zshrc

And zsh will actually look at

    $ZDOTDIR/.zshenv
    $ZDOTDIR/.zprofile
    $ZDOTDIR/.zshrc
    $ZDOTDIR/.zlogin
    $ZDOTDIR/.zlogout
So perhaps you can set the value of ZDOTDIR in one of the systemwide locations to use "$HOME/foo/bar/zsh/" and this way zsh will use ~/foo/bar/zsh/ as the location for the user specific .zshrc and other mentioned files for every user

https://eng.libretexts.org/Bookshelves/Computer_Science/Oper...

https://bash.cyberciti.biz/guide/Setting_system_wide_shell_o...

https://zsh.sourceforge.io/Intro/intro_3.html



Yep! On my real systems, my configured shell is a wrapper which sets ZDOTDIR and execs zsh from my nix profile.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: