[arch-general] Zsh, tmux, and paths
manolo at austrohungaro.com
Thu Mar 14 08:25:35 EDT 2013
On 03/13/13 at 09:46pm, Ivan S. Freitas wrote:
> On Wed, Mar 13, 2013 at 4:31 PM, Manolo Martínez
> <manolo at austrohungaro.com> wrote:
> > Hello,
> > I've noticed that, if one modifies the PATH environment variable in
> > .zshenv, tmux fails to notice this. That is, `echo $PATH` yields
> > different results within and without tmux, with the former being the
> > default path, and the latter the path as modified by .zshenv.
> > When I update PATH in .zshrc, though, it is picked up fine by tmux.
> This should also happen when you log in a tty.
> > * First sources .zshenv
> > * Then sources /etc/zsh/zprofile
> > * Then .zshrc
> > In the second step, /etc/zsh/zprofile sources /etc/profile,
> > which changes the path back to the default. Might this be
> > the reason why tmux picks .zshrc path changes up correctly, but not
> > .zshenv path changes?
> It was reported  and documented in the wiki . zprofile sources
> which replaces your $PATH ignoring already existing settings. What I did was
> modify /etc/profile to include the value of PATH in the newly created variable:
>  https://bugs.archlinux.org/task/31873
>  https://wiki.archlinux.org/index.php/Zsh#Configuration_files
I had read the wiki, but before my path woes, and failed to put two and
two together. Thanks for the info. If I may ask, what's the rationale
for overwriting the path?
More information about the arch-general