Guys I recently switched to fish from Bash and I've run into problems setting some specific variables for golang in fish.

In my bashrc I would set them using:

export PATH="$PATH:$(go env GOPATH)/bin"
export PATH=$PATH:/usr/local/go/bin:/home/sahil/go/bin

Can someone show me how to achieve the same result using set in config.fish

1 Answer 1


Never mind I figured it out.

set PATH "$PATH:(go env GOPATH)/bin"
set PATH $PATH:/usr/local/go/bin:/home/sahil/go/bin
  • 3
    command substitution does not happen inside quotes: set PATH "$PATH:"(go env GOPATH)"/bin" Dec 3, 2020 at 12:28

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.