I've got this in my bash_profile, and I can't figure out the equivalent in Fish:

export PATH=$PATH:~/Dev/ark/bin export PATH=$PATH:~/bin/ export PATH=$PATH:~/i386-elf/bin/ export GOPATH=~/Dev/gocode/ export PATH=$PATH:$GOPATH/bin 

How do I do that in my fish configuration file? I've tried

set PATH $PATH:$GOPATH/bin 

But that doesn't seem to work.

EDIT: I fixed my fish config to be

set -x GOPATH ~/Dev/gocode set -U fish_user_paths $fish_user_paths ~/Dev/ark/bin ~/bin/ ~/i386-elf/bin $GOPATH/bin 

But I dunno if you want to close the question or if anyone wants to submit an answer or...?

5

1 Answer

To set a custom environmental variable it appears that you use -x and then the path. For a persistent environmental variable, you have to set the fish_user_paths, which will append the given paths to your $PATH.

pathpathpathpath

set -x GOPATH ~/Dev/gocode set -U fish_user_paths $fish_user_paths ~/Dev/ark/bin ~/bin/ ~/i386-elf/bin $GOPATH/bin 
1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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