mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-12-21 07:03:41 +08:00
44 lines
833 B
ReStructuredText
44 lines
833 B
ReStructuredText
|
.. _cmd-export:
|
||
|
|
||
|
export - compatibility function for exporting variables
|
||
|
=======================================================
|
||
|
|
||
|
Synopsis
|
||
|
--------
|
||
|
|
||
|
.. synopsis::
|
||
|
|
||
|
export
|
||
|
export NAME=VALUE
|
||
|
|
||
|
|
||
|
Description
|
||
|
-----------
|
||
|
|
||
|
``export`` is a function included for compatibility with POSIX shells. In general, the :doc:`set <set>`
|
||
|
builtin should be used instead.
|
||
|
|
||
|
When called without arguments, ``export`` prints a list of currently-exported variables, like ``set
|
||
|
-x``.
|
||
|
|
||
|
When called with a ``NAME=VALUE`` pair, the variable ``NAME`` is set to ``VALUE`` in the global
|
||
|
scope, and exported as an environment variable to other commands.
|
||
|
|
||
|
There are no options available.
|
||
|
|
||
|
Example
|
||
|
-------
|
||
|
|
||
|
The following commands have an identical effect.
|
||
|
|
||
|
::
|
||
|
|
||
|
set -gx PAGER bat
|
||
|
export PAGER=bat
|
||
|
|
||
|
|
||
|
See more
|
||
|
--------
|
||
|
|
||
|
1. The :doc:`set <set>` command.
|