Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken $PATHs order when direnv is used with reattach-to-user-namespace & tmux #145

Closed
907th opened this issue Nov 12, 2014 · 5 comments
Closed

Comments

@907th
Copy link

907th commented Nov 12, 2014

My .envrc is just PATH_add bin. But when I start tmux the bin is being moved to the back of the $PATH. Seems like it is caused by reattach-to-user-namespace which I use for starting zsh in tmux (set -g default-command "reattach-to-user-namespace -l zsh").

Log:

$ tmux
$ echo $PATH
/Users/laise/.rvm/gems/ruby-2 ... /sbin:/Users/laise/Work/epayservice/beta/bin
$ cd ..
direnv: unloading                                                                                       
$ cd beta
direnv: loading .envrc                                                                                  
direnv: export ~PATH
$ echo $PATH 
/Users/laise/Work/epayservice/beta/bin:/Users/lais ...

As you can see all is fixed when I cd .. & cd back

@907th
Copy link
Author

907th commented Nov 12, 2014

This issue may have some relation to #106

@zimbatm
Copy link
Member

zimbatm commented Nov 12, 2014

It's all tmux's fault :p Can we get them to just use the current env
without messing with it, or create a new login session instead ?
On 12 Nov 2014 17:53, "Alexey Chernenkov" notifications@github.com wrote:

This issue may have some relation #106
https://github.com/zimbatm/direnv/issues/106


Reply to this email directly or view it on GitHub
https://github.com/zimbatm/direnv/issues/145#issuecomment-62761213.

@907th
Copy link
Author

907th commented Nov 13, 2014

Oh, hopefully the problem disappeared today when I restarted my Mac :o)
BTW I were solving the issue by running direnv reload once right after tmux start

@907th 907th closed this as completed Nov 13, 2014
@zimbatm
Copy link
Member

zimbatm commented Nov 13, 2014

For tmux users I propose the following solution: zimbatm@9419ef5

@907th
Copy link
Author

907th commented Nov 13, 2014

@zimbatm Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants