I have somehow screwed up my path variables with Fish shell on OS X. Is this the proper $PATH variable in the config.fish?

user@host ~> more ~/.config/fish/config.fish
set -g -x PATH /usr/local/bin $PATH
set -g -x fish_greeting 'Welcome to fish shell, Ansel'

user@host ~> more /etc/paths

e202414@TWC-MACS1DF91 ~> echo $PATH
/usr/local/bin /usr/bin /bin /usr/sbin /sbin /usr/local/bin /usr/bin /bin /usr/sbin /sbin /usr/local/bin /opt/X11/bin

migrated from serverfault.com May 31 '15 at 6:59

This question came from our site for system and network administrators.

  • Is $fish_user_paths set? – ridiculous_fish May 31 '15 at 18:27
  • user@host ~> echo $fish_user_paths /usr/bin /bin /usr/sbin /sbin /usr/local/bin thanks so much for helping and for the amazing shell! – Ansel Gaddy May 31 '15 at 19:54
  • I think this issue came from upgrading my python and not from fish shell. I did brew reinstall python and it fixed pip for me. What is the proper way for me to clean up my $PATH variable in Fish? I have been looking at the $PATH information on the Fish howto but I want to make sure I do it correctly. Thanks! – Ansel Gaddy May 31 '15 at 20:08
  • 1
    My advice is to set fish_user_paths to include those path components that you wish to add to the default $PATH. For example, /bin is surely in $PATH already so it doesn't need to be in $fish_user_paths. – ridiculous_fish Jun 1 '15 at 21:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.