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

$PATH on OS X again #927

Closed
ahti opened this Issue Jul 23, 2013 · 3 comments

Comments

Projects
None yet
2 participants
@ahti
Contributor

ahti commented Jul 23, 2013

So, fish does /etc/paths now, which is great. There is one thing that does not work that well though:

With system-bash, my path looks like this:

/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:
/opt/X11/bin:/usr/local/MacGPG2/bin:/usr/local/share/npm/bin:/usr/texbin

this is pretty much what i expected according to my /etc/paths and /etc/paths.d/*.

/usr/bin /bin /usr/sbin /sbin /usr/local/bin /usr/local/sbin
/opt/X11/bin /usr/local/MacGPG2/bin /usr/texbin /usr/local/share/npm/bin

The problem is, that fish does not reorder things that are in $PATH already when /usr/local/share/fish/config.fish is executed. I put a echo $PATH at the top of the file, and it seems that this:

/usr/bin /bin /usr/sbin /sbin

is the path fish inherits from launchd.

I think that, if a /etc/paths file is found, fish should throw away the old path, and rebuild it completely from the files.

This would also mean moving the reconstruction of fish_user_path after the Mac OS X bit.

It also seems fish orders the files in /etc/paths.d/ a bit differently than path_helper, but I don't think thats really an issue. The files I have in that directory are named as follows:

40-XQuartz
MacGPG2
TeX
npm 
@ahti

This comment has been minimized.

Show comment
Hide comment
@ahti

ahti Jul 23, 2013

Contributor

Oh, I just saw the old issue is still open, too: #417

Contributor

ahti commented Jul 23, 2013

Oh, I just saw the old issue is still open, too: #417

@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Aug 25, 2013

Member

bash does not actually throw away the PATH it inherits. Instead it just keeps accumulating more junk onto it.

Member

ridiculousfish commented Aug 25, 2013

bash does not actually throw away the PATH it inherits. Instead it just keeps accumulating more junk onto it.

ridiculousfish added a commit that referenced this issue Aug 25, 2013

Rearrange the PATH to respect the order defined in /etc/paths (#927) and
to prepend it to $PATH instead of appending it (#950)
@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Aug 25, 2013

Member

We should not blow away $PATH entirely, but commit dead45f and 9f46881 should reorder the contents of $PATH so that stuff in /etc/paths comes earlier, which I think should address this. Thanks for reporting this.

Member

ridiculousfish commented Aug 25, 2013

We should not blow away $PATH entirely, but commit dead45f and 9f46881 should reorder the contents of $PATH so that stuff in /etc/paths comes earlier, which I think should address this. Thanks for reporting this.

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