mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 21:03:12 +00:00
parent
7aaa3b8553
commit
203927245d
3 changed files with 14 additions and 14 deletions
|
@ -3,7 +3,7 @@ Frequently asked questions
|
|||
|
||||
How do I set or clear an environment variable?
|
||||
----------------------------------------------
|
||||
Use the <a href="commands.html#set">``set``</a> command::
|
||||
Use the `set <cmds/set.html>`__ command::
|
||||
|
||||
set -x key value
|
||||
set -e key
|
||||
|
@ -26,7 +26,7 @@ The prompt is the output of the ``fish_prompt`` function. Put it in ``~/.config/
|
|||
end
|
||||
|
||||
|
||||
You can also use the Web configuration tool, <a href="commands.html#fish_config">``fish_config``</a>, to preview and choose from a gallery of sample prompts.
|
||||
You can also use the Web configuration tool, `fish_config <cmds/fish_config.html>`__, to preview and choose from a gallery of sample prompts.
|
||||
|
||||
|
||||
How do I run a command from history?
|
||||
|
@ -93,7 +93,7 @@ If you are just interested in success or failure, you can run the command direct
|
|||
end
|
||||
|
||||
|
||||
See the documentation for <a href="commands.html#test">``test``</a> and <a href="commands.html#if">``if``</a> for more information.
|
||||
See the documentation for `test <cmds/test.html>`__ and `if <cmds/if.html>`__ for more information.
|
||||
|
||||
~~
|
||||
How do I set an environment variable for just one command?
|
||||
|
@ -154,7 +154,7 @@ variables.
|
|||
This means that the global value takes precedence over the universal value.
|
||||
|
||||
To avoid this problem, consider changing the setting which fish inherits. If this is not possible,
|
||||
add a statement to your <a href="index.html#">user initialization file</a> (usually
|
||||
add a statement to your `user initialization file <index#initialization-files>`__ (usually
|
||||
``~/.config/fish/config.fish``)::
|
||||
|
||||
set -gx EDITOR vim
|
||||
|
@ -162,12 +162,12 @@ add a statement to your <a href="index.html#">user initialization file</a> (usua
|
|||
|
||||
How do I customize my syntax highlighting colors?
|
||||
-------------------------------------------------
|
||||
Use the web configuration tool, <a href="commands.html#fish_config">``fish_config``</a>, or alter the <a href="index.html#variables-color">``fish_color`` family of environment variables</a>.
|
||||
Use the web configuration tool, `fish_config <cmds/fish_config.html>`__, or alter the `fish_color family of environment variables <index#variables-color>`__.
|
||||
|
||||
~~
|
||||
How do I update man page completions?
|
||||
-------------------------------------
|
||||
Use the <a href="commands.html#fish_update_completions">``fish_update_completions``</a> command.
|
||||
Use the `fish_update_completions <cmds/fish_update_completions.html>`__ command.
|
||||
|
||||
~~
|
||||
I accidentally entered a directory path and fish changed directory. What happened?
|
||||
|
@ -177,7 +177,7 @@ If fish is unable to locate a command with a given name, and it starts with '``.
|
|||
|
||||
The open command doesn't work.
|
||||
------------------------------
|
||||
The ``open`` command uses the MIME type database and the ``.desktop`` files used by Gnome and KDE to identify filetypes and default actions. If at least one of these environments is installed, but the open command is not working, this probably means that the relevant files are installed in a non-standard location. Consider <a href="index.html#more-help">asking for more help</a>.
|
||||
The ``open`` command uses the MIME type database and the ``.desktop`` files used by Gnome and KDE to identify filetypes and default actions. If at least one of these environments is installed, but the open command is not working, this probably means that the relevant files are installed in a non-standard location. Consider `asking for more help <index#more-help>`__.
|
||||
|
||||
|
||||
How do I make fish my default shell?
|
||||
|
|
|
@ -719,7 +719,7 @@ Examples:
|
|||
|
||||
- ``**`` matches any files and directories in the current directory and all of its subdirectories.
|
||||
|
||||
Note that for most commands, if any wildcard fails to expand, the command is not executed, ```$status`` <#variables-status>`_ is set to nonzero, and a warning is printed. This behavior is consistent with setting ``shopt -s failglob`` in bash. There are exactly 3 exceptions, namely `set <cmds/set.html>`_, `count <cmds/count.html>`_ and `for <cmds/for.html>`_. Their globs are permitted to expand to zero arguments, as with ``shopt -s nullglob`` in bash.
|
||||
Note that for most commands, if any wildcard fails to expand, the command is not executed, `$status <#variables-status>`_ is set to nonzero, and a warning is printed. This behavior is consistent with setting ``shopt -s failglob`` in bash. There are exactly 3 exceptions, namely `set <cmds/set.html>`_, `count <cmds/count.html>`_ and `for <cmds/for.html>`_. Their globs are permitted to expand to zero arguments, as with ``shopt -s nullglob`` in bash.
|
||||
|
||||
Examples::
|
||||
|
||||
|
@ -1191,7 +1191,7 @@ The user can change the settings of ``fish`` by changing the values of certain v
|
|||
|
||||
- ``fish_ambiguous_width`` controls the computed width of ambiguous East Asian characters. This should be set to 1 if your terminal emulator renders these characters as single-width (typical), or 2 if double-width.
|
||||
|
||||
- ``fish_escape_delay_ms`` overrides the default timeout of 30ms after seeing an escape character before giving up on matching a key binding. See the documentation for the `bind <cmds/bind.html#special-case-escape>`__ builtin command. This delay facilitates using escape as a meta key.
|
||||
- ``fish_escape_delay_ms`` overrides the default timeout of 30ms after seeing an escape character before giving up on matching a key binding. See the documentation for the `bind <cmds/bind.html#special-case-the-escape-character>`__ builtin command. This delay facilitates using escape as a meta key.
|
||||
|
||||
- ``fish_greeting``, the greeting message printed on startup.
|
||||
|
||||
|
@ -1627,7 +1627,7 @@ Configuration files are evaluated in the following order:
|
|||
If there are multiple files with the same name in these directories, only the first will be executed.
|
||||
They are executed in order of their filename, sorted (like globs) in a natural order (i.e. "01" sorts before "2").
|
||||
|
||||
- System-wide configuration files, where administrators can include initialization that should be run for all users on the system - similar to ``/etc/profile`` for POSIX-style shells - in ``$__fish_sysconf_dir``` (usually ``/etc/fish/config.fish``);
|
||||
- System-wide configuration files, where administrators can include initialization that should be run for all users on the system - similar to ``/etc/profile`` for POSIX-style shells - in ``$__fish_sysconf_dir` (usually /etc/fish/config.fish``);
|
||||
- User initialization, usually in `~/.config/fish/config.fish` (controlled by the ``XDG_CONFIG_HOME`` environment variable, and accessible as ``$__fish_config_dir``).
|
||||
|
||||
These paths are controlled by parameters set at build, install, or run time, and may vary from the defaults listed above.
|
||||
|
|
|
@ -338,7 +338,7 @@ You can iterate over a list (or a slice) with a for loop::
|
|||
<outp>entry: /usr/local/bin</outp>
|
||||
|
||||
|
||||
Lists adjacent to other lists or strings are expanded as <a href="index.html#cartesian-product">cartesian products</a> unless quoted (see <a href="index.html#expand-variable">Variable expansion</a>)::
|
||||
Lists adjacent to other lists or strings are expanded as `cartesian products <index#cartesian-product>`__ unless quoted (see `Variable expansion <index#expand-variable>`__)::
|
||||
|
||||
>_ set a 1 2 3
|
||||
>_ set 1 a b c
|
||||
|
@ -350,7 +350,7 @@ Lists adjacent to other lists or strings are expanded as <a href="index.html#car
|
|||
<outp>1 2 3 banana</outp>
|
||||
|
||||
|
||||
This is similar to <a href="index.html#expand-brace">Brace expansion</a>.
|
||||
This is similar to `Brace expansion <index#expand-brace>`__.
|
||||
|
||||
Command Substitutions
|
||||
---------------------
|
||||
|
@ -445,7 +445,7 @@ Use ``if``, ``else if``, and ``else`` to conditionally execute code, based on th
|
|||
end
|
||||
|
||||
|
||||
To compare strings or numbers or check file properties (whether a file exists or is writeable and such), use <a href="commands.html#test">test</a>, like
|
||||
To compare strings or numbers or check file properties (whether a file exists or is writeable and such), use `test <cmds/test.html>`__, like
|
||||
|
||||
|
||||
|
||||
|
@ -650,7 +650,7 @@ This is the preferred way to define your prompt as well::
|
|||
end
|
||||
|
||||
|
||||
See the documentation for <a href="commands.html#funced">funced</a> and <a href="commands.html#funcsave">funcsave</a> for ways to create these files automatically.
|
||||
See the documentation for `funced <cmds/funced.html>`__ and `funcsave <cmds/funcsave.html>`__ for ways to create these files automatically.
|
||||
|
||||
Universal Variables
|
||||
-------------------
|
||||
|
|
Loading…
Reference in a new issue