I have been playing around with FISH for a few days and I just tried to switch it to my main shell. That worked fine but now none of my software from MacPorts is recognized.

I installed and followed the advice from http://ridiculousfish.com/shell/faq.html, using the package installer form here http://ridiculousfish.com/shell/.

The python script made this entry from my .profile to my config.fish file

set_default export PATH "/opt/local/bin:/opt/local/sbin:$PATH"

but I get this error

fish: Unknown command 'set_default'
/Users/ley/.config/fish/config.fish (line 1): set_default export PATH "/opt/local/bin:/opt/local/sbin:$PATH" ^ in . (source) call of file '/Users/ley/.config/fish/config.fish', called on standard input,

I fiddled with the set command a bit but that didn't seem to help much.

Any advice?

  • 1
    Please take this in a spirit of helpfulness, but if I were you, I'd take this as a sign that I'm not ready to commit to switching to this shell yet. Getting one's PATH set up right is like the "hello world" of shell usage. – Spiff Jun 14 '12 at 3:34

It looks like you want:

set -xg PATH /opt/local/bin /opt/local/sbin $PATH

Edit: I see what you mean, this syntax takes some getting used to. It wants spaces instead of colons, and it can't be in quotes, and all the paths in your current PATH must actually exist (in my case, I had /usr/local/sbin in my PATH even though it didn't actually exist, and that was a problem for fish).

  • @Ley If you read my Answer previously, please read it again now that I've edited it a couple times to fix some syntax errors. – Spiff Jun 14 '12 at 4:08
  • Thank you so much for the help. Still getting the hang of it seems like it's filled with good ideas so far just been using bash forever and a half. – Ley Missailidis Jun 14 '12 at 13:45

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.