mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-14 05:31:14 -03:00
docs: Point away from set -x
This is a common anti-pattern, we should try to get people to do `set -gx`.
This commit is contained in:
@@ -294,6 +294,8 @@ It can also be unexported with ``--unexport`` or ``-u``.
|
||||
|
||||
This works the other way around as well! If fish is started by something else, it inherits that parents exported variables. So if your terminal emulator starts fish, and it exports ``$LANG`` set to ``en_US.UTF-8``, fish will receive that setting. And whatever started your terminal emulator also gave *it* some variables that it will then pass on unless it specifically decides not to. This is how fish usually receives the values for things like ``$LANG``, ``$PATH`` and ``$TERM``, without you having to specify them again.
|
||||
|
||||
Note that exported variables can be local or global or universal - "exported" is not a :ref:`scope <variables-scope>`. Usually you'd make them global via ``set -gx MyVariable SomeValue``.
|
||||
|
||||
.. _tut-lists:
|
||||
|
||||
Lists
|
||||
|
||||
Reference in New Issue
Block a user