rye icon indicating copy to clipboard operation
rye copied to clipboard

Add env source to `.zprofile` for zsh

Open j178 opened this issue 1 year ago • 3 comments

Fixes #728

j178 avatar Feb 21 '24 12:02 j178

I was also working on it but you were faster 👍 Thanks!

dnlbauer avatar Feb 21 '24 12:02 dnlbauer

I was hoping this is not necessary but I guess not? On my machine for whatever reason .profile is also sourced for ZSH. Is there really no standard file that every system sources? (other than fish, nushell etc. of course)

mitsuhiko avatar Feb 21 '24 13:02 mitsuhiko

@mitsuhiko to my knowledge there is no single file that we can be sure is always read from both, bash and zsh. At least the zsh documentation does not list a file that is also used by bash: https://zsh.sourceforge.io/Doc/Release/Files.html#Files

On my wsl/ubuntu, .profile is not read, but might depend on the distro? Since most bash scripts are zsh-compatible, I can imagine some distros to somehow add .profile while others do not. Maybe this is why it is working for you?

edit: according to some stackoverlow answers, .profile is read if sh/ksh compatibility mode is activated. But at least on my machine this is not enabled by default.

dnlbauer avatar Feb 21 '24 13:02 dnlbauer