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

Re: zprofile and .profile sourcing



On Thu, Sep 8, 2022 at 4:37 PM Piscium <groknok@xxxxxxxxx> wrote:
>
> I have been trying (unsuccessfully) to figure out why ~/.profile is
> sourced in some cases and not in others.

> The Zsh man page says (in different sections):
> "Login shells source /etc/profile followed by $HOME/.profile."

That's only in sh or ksh compatibility mode.

> "If the shell is a login shell, commands are read from
> /etc/zsh/zprofile and then $ZDOTDIR/.zprofile."

As Eric Cook already pointed out, the display manager sources
~/.profile for you when you login, but that doesn't happen in the
console, you need to source ~/.profile from ~/.zprofile.

I actually created a video going step by step on how to create a
proper configuration [1], and I also maintain a very simple
configuration that should be generic enough for everyone [2].

Cheers.

[1] https://youtu.be/ESEP7WezCqY
[2] https://github.com/felipec/dot-team

-- 
Felipe Contreras




Messages sorted by: Reverse Date, Date, Thread, Author