Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
setenv vs set -x vs export #2704
The fish way to do this is using the
set -x foo
In the example above,
Either way, the variable will be available to all children processes created from the same scope.
function foo set -lx IFS "@" bar end
In the example above, we export IFS as
Here is the documentation for set.
There's an additional point:
> type set set is a builtin > type setenv setenv is a function with definition [...] > type export export is a function with definition [...]
We ship functions called