mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-24 03:35:13 +08:00
parent
767ae87191
commit
0d9ad0f23b
43
doc_src/cmds/export.rst
Normal file
43
doc_src/cmds/export.rst
Normal file
@ -0,0 +1,43 @@
|
||||
.. _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.
|
@ -79,6 +79,7 @@ Some helper functions, often to give you information for use in your prompt:
|
||||
- :doc:`fish_add_path <cmds/fish_add_path>` to easily add a path to $PATH.
|
||||
- :doc:`alias <cmds/alias>` to quickly define wrapper functions ("aliases").
|
||||
- :doc:`fish_delta <cmds/fish_delta>` to show what you have changed from the default configuration.
|
||||
- :doc:`export <cmds/export>` as a compatibility function for other shells.
|
||||
|
||||
Helper commands
|
||||
^^^^^^^^^^^^^^^
|
||||
|
Loading…
x
Reference in New Issue
Block a user