From e34f0e7c9ff1ba59163f7f0fae53943e0cad42e9 Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Thu, 1 Dec 2022 18:00:06 +0100 Subject: [PATCH] docs: Add some more envvars to reference (and fix a couple of references) --- CHANGELOG.rst | 2 +- doc_src/cmds/cdh.rst | 2 +- doc_src/cmds/help.rst | 2 +- doc_src/cmds/set_color.rst | 2 +- doc_src/language.rst | 18 ++++++++++++++++++ 5 files changed, 22 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1b0aa051f..88d80add7 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -223,7 +223,7 @@ Deprecations and removed features This flag was introduced in fish 3.4. - To turn off these flags, add ``no-regex-easyesc`` or ``no-ampersand-nobg-in-token`` to :envvar:`fish_features`` and restart fish:: + To turn off these flags, add ``no-regex-easyesc`` or ``no-ampersand-nobg-in-token`` to :envvar:`fish_features` and restart fish:: set -Ua fish_features no-regex-easyesc diff --git a/doc_src/cmds/cdh.rst b/doc_src/cmds/cdh.rst index ec9514b30..606c0257c 100644 --- a/doc_src/cmds/cdh.rst +++ b/doc_src/cmds/cdh.rst @@ -19,7 +19,7 @@ You can also press :kbd:`Tab` to use the completion pager to select an item from If you give it a single argument it is equivalent to ``cd DIRECTORY``. Note that the ``cd`` command limits directory history to the 25 most recently visited directories. -The history is stored in the :envvar:`dirprev` and :envvar:`$dirnext` variables, which this command manipulates. +The history is stored in the :envvar:`dirprev` and :envvar:`dirnext` variables, which this command manipulates. If you make those universal variables, your ``cd`` history is shared among all fish instances. See Also diff --git a/doc_src/cmds/help.rst b/doc_src/cmds/help.rst index 5bff32f13..4c5a19804 100644 --- a/doc_src/cmds/help.rst +++ b/doc_src/cmds/help.rst @@ -19,7 +19,7 @@ If a *SECTION* is specified, the help for that command is shown. The **-h** or **--help** option displays help about using this command. -If the :envvar:`BROWSER`` environment variable is set, it will be used to display the documentation. +If the :envvar:`BROWSER` environment variable is set, it will be used to display the documentation. Otherwise, fish will search for a suitable browser. To use a different browser than as described above, one can set the :envvar:`fish_help_browser` variable. This variable may be set as a list, where the first element is the browser command and the rest are browser options. diff --git a/doc_src/cmds/set_color.rst b/doc_src/cmds/set_color.rst index 82aa0d4e3..625088673 100644 --- a/doc_src/cmds/set_color.rst +++ b/doc_src/cmds/set_color.rst @@ -87,7 +87,7 @@ In particular it will: If terminfo reports 256 color support for a terminal, 256 color support will always be enabled. -To force true-color support on or off, set :envvar:`fish_term24bit`` to "1" for on and 0 for off - ``set -g fish_term24bit 1``. +To force true-color support on or off, set :envvar:`fish_term24bit` to "1" for on and 0 for off - ``set -g fish_term24bit 1``. To debug color palette problems, ``tput colors`` may be useful to see the number of colors in terminfo for a terminal. Fish launched as ``fish -d term_support`` will include diagnostic messages that indicate the color support mode in use. diff --git a/doc_src/language.rst b/doc_src/language.rst index 871d0dfab..db517fddd 100644 --- a/doc_src/language.rst +++ b/doc_src/language.rst @@ -1315,6 +1315,14 @@ You can change the settings of fish by changing the values of certain variables. sets how long fish waits for another key after seeing an escape, to distinguish pressing the escape key from the start of an escape sequence. The default is 30ms. Increasing it increases the latency but allows pressing escape instead of alt for alt+character bindings. For more information, see :ref:`the chapter in the bind documentation `. +.. envvar:: fish_complete_path + + determines where fish looks for completion. When trying to complete for a command, fish looks for files in the directories in this variable. + +.. envvar:: fish_function_path + + determines where fish looks for functions. When fish :ref:`autoloads ` a function, it will look for files in these directories. + .. envvar:: fish_greeting the greeting message printed on startup. This is printed by a function of the same name that can be overridden for more complicated changes (see :doc:`funced `) @@ -1370,6 +1378,10 @@ Fish also provides additional information through the values of certain environm a list of entries in fish's :ref:`kill ring ` of cut text. +.. envvar:: fish_read_limit + + how many bytes fish will process with :doc:`read ` or in a :ref:`command substitution `. + .. envvar:: fish_pid the process ID (PID) of the shell. @@ -1414,6 +1426,12 @@ Fish also provides additional information through the values of certain environm the "generation" count of ``$status``. This will be incremented only when the previous command produced an explicit status. (For example, background jobs will not increment this). +.. ENVVAR:: TERM + + the type of the current terminal. When fish tries to determine how the terminal works - how many colors it supports, what sequences it sends for keys and other things - it looks at this variable and the corresponding information in the terminfo database (see ``man terminfo``). + + Note: Typically this should not be changed as the terminal sets it to the correct value. + .. ENVVAR:: USER the current username. This variable can be changed.