docs: Document that the man pages are for our builtins

For builtins that have the same name as common commands, it might not
be entirely obvious that there is another page.

So, for those builtins, we add a note, but only in the man pages.

(exception is true and false because the note would be longer than the
page, and it's fridging true and false)

Fixes #8077.
This commit is contained in:
Fabian Homborg 2021-07-16 18:21:41 +02:00
parent ee8c5579f3
commit 801d7e3e11
5 changed files with 31 additions and 0 deletions

View File

@ -12,6 +12,13 @@ Synopsis
Description
-----------
.. only:: builder_man
NOTE: This page documents the fish builtin ``printf``.
To see the documentation on the ``printf`` command you might have,
use ``command man printf``.
printf uses the format string FORMAT to print the ARGUMENT arguments. This means that it takes format specifiers in the format string and replaces each with an argument.
The ``format`` argument is re-used as many times as necessary to convert all of the given arguments. So ``printf %s\n flounder catfish clownfish shark`` will print four lines.

View File

@ -14,6 +14,12 @@ Synopsis
Description
-----------
.. only:: builder_man
NOTE: This page documents the fish builtin ``pwd``.
To see the documentation on the ``pwd`` command you might have,
use ``command man pwd``.
``pwd`` outputs (prints) the current working directory.
The following options are available:

View File

@ -13,6 +13,12 @@ Synopsis
Description
-----------
.. only:: builder_man
NOTE: This page documents the fish builtin ``realpath``.
To see the documentation on the ``realpath`` command you might have,
use ``command man realpath``.
``realpath`` resolves a path to its absolute path.
fish provides a ``realpath`` builtin as a fallback for systems where there is no ``realpath`` command, your OS might provide a version with more features.

View File

@ -15,6 +15,12 @@ Synopsis
Description
-----------
.. only:: builder_man
NOTE: This page documents the fish builtin ``test``.
To see the documentation on the ``test`` command you might have,
use ``command man test``.
Tests the expression given and sets the exit status to 0 if true, and 1 if false. An expression is made up of one or more operators and their arguments.
The first form (``test``) is preferred. For compatibility with other shells, the second form is available: a matching pair of square brackets (``[ [EXPRESSION ] ]``).

View File

@ -13,6 +13,12 @@ Synopsis
Description
-----------
.. only:: builder_man
NOTE: This page documents the fish keyword ``time``.
To see the documentation on the ``time`` command you might have,
use ``command man time``.
``time`` causes fish to measure how long a command takes and print the results afterwards. The command can be a simple fish command or a block. The results can not currently be redirected.
For checking timing after a command has completed, check :ref:`$CMD_DURATION <variables-special>`.