Paymahn Moghadasian Paymahn Moghadasian - 1 year ago 67
Bash Question

Modifying PATH with fish shell

I'm currently playing around with the fish shell and I'm having some trouble wrapping my head around how the

variable is set. For what it's worth, I'm also using oh-my-fish.

If I echo my current path I get:

➜ fish echo $PATH
/usr/local/bin /usr/bin /bin /usr/sbin /sbin /usr/local/bin /opt/X11/bin /usr/texbin /Users/myname/.opam/system/bin

Looking at
I see the following line

set PATH /usr/local/bin $PATH /Users/myname/.opam/system/bin

My question is (and this phrasing will probably reflect my lack of knowledge on the subject): prior to
being processed, where is the
variable set? ie: where do all of the paths between
come from?

Answer Source

This command:

set -U fish_user_paths /usr/local/bin $fish_user_paths

This will add /usr/local/bin permanently to your path.