[arch-general] Zsh, tmux, and paths
Ivan S. Freitas
ivansichfreitas at gmail.com
Wed Mar 13 20:46:04 EDT 2013
On Wed, Mar 13, 2013 at 4:31 PM, Manolo Martínez
<manolo at austrohungaro.com> wrote:
> 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:
Ivan Sichmann Freitas
GNU/Linux user #509059
SDF MetaArpa Member http://isf.sdf.org/about.html
More information about the arch-general