environment variables - Modifying PATH with fish shell -
i'm playing around fish shell , i'm having problem wrapping head around how path
variable set. it's worth, i'm using oh-my-fish.
if echo current path 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 @ ~/.config/fish/config.fish
see next line
set path /usr/local/bin $path /users/myname/.opam/system/bin
my question (and phrasing reflect lack of knowledge on subject): prior config.fish
beingness processed, path
variable set? ie: of paths between /usr/local/bin
, /users/myname/.opam/system/bin
come from?
like shells, fish inherits path environment started in. how set login shells differs between operating systems - on linux, example, /etc/login.defs
controls initial path set login shells. don't know how set on os x.
next, bash
or csh
, initialisation files shell may alter path. fish on os x, there code in share/fish/config.fish
load paths standard os x path configuration files /etc/paths
, /etc/paths.d/*
. there alternative code set useful path on solaris.
there code pick paths universal variable $fish_user_paths
, right way add together path , have reflected across shells.
shell environment-variables fish
No comments:
Post a Comment