Re: [Fish-users] Proper way to put /usr/local/bin before /usr/bin/ in $PATH
Status: Beta
Brought to you by:
liljencrantz
|
From: Jesse A. <jes...@me...> - 2013-08-22 21:05:08
|
Yeah. This is exactly what I'm doing now. :/ Seems a little sketchy, but I do something similar. # NOTE: There is probably a sexier nicer way to do this, but until I figure that out I am manually unsetting here. # Unsets PATH set -g -x PATH # This allows us to use Homebrew versions of things (like git) rather than the pre-installed or XCode installed versions. # See http://blog.grayghostvisuals.com/git/how-to-keep-git-updated/ for reference. set -g -x PATH $PATH /usr/local/bin # Sets necessary PATH defaults set -g -x PATH $PATH /usr/bin /bin /usr/sbin /sbin — Jesse Atkinson jes...@me... On Aug 22, 2013, at 1:43 PM, Robert Carpenter <ro...@ro...> wrote: > Hey Jesse, > > I ran into the exact same problem a few months ago. A friendly fish user suggested I explicitly set my path in config.fish and that has worked. The line in my ~/.config/fish/config.fish file is: > > set -x PATH /usr/local/bin /usr/bin /bin /usr/local/sbin /usr/sbin /sbin > > I'm sure there are drawbacks to this method, but it has worked for me for a few months now. > > Cheers > Robert > > > On Thu, Aug 22, 2013 at 9:42 PM, Jesse Atkinson <jes...@me...> wrote: > There's been a lot of discussion of how to properly set $PATH. $fish_user_paths works but only if you want to append to the $PATH. I use Homebrew to keep git, MySql, and many other formula's up-to-date. If I add /usr/local/bin/ to $fish_user_paths it appends and Fish still uses the git version located in /usr/bin/ which is the OS X default installed and out-of-date version. > > What's the proper way to prepend to $PATH so that your Homebrew formulas take precedence? > > — > Jesse Atkinson > jes...@me... > > > ------------------------------------------------------------------------------ > Introducing Performance Central, a new site from SourceForge and > AppDynamics. Performance Central is your source for news, insights, > analysis and resources for efficient Application Performance Management. > Visit us today! > http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk > _______________________________________________ > Fish-users mailing list > Fis...@li... > https://lists.sourceforge.net/lists/listinfo/fish-users > > |