From 801d7e3e1143b6934d1143a004ab2fd73a526090 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Fri, 16 Jul 2021 18:21:41 +0200 Subject: [PATCH] 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. --- doc_src/cmds/printf.rst | 7 +++++++ doc_src/cmds/pwd.rst | 6 ++++++ doc_src/cmds/realpath.rst | 6 ++++++ doc_src/cmds/test.rst | 6 ++++++ doc_src/cmds/time.rst | 6 ++++++ 5 files changed, 31 insertions(+) diff --git a/doc_src/cmds/printf.rst b/doc_src/cmds/printf.rst index 49a1ea4a5..5810b2469 100644 --- a/doc_src/cmds/printf.rst +++ b/doc_src/cmds/printf.rst @@ -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. diff --git a/doc_src/cmds/pwd.rst b/doc_src/cmds/pwd.rst index bc155c206..fe6f13fc3 100644 --- a/doc_src/cmds/pwd.rst +++ b/doc_src/cmds/pwd.rst @@ -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: diff --git a/doc_src/cmds/realpath.rst b/doc_src/cmds/realpath.rst index e4b858a43..9e96d2f17 100644 --- a/doc_src/cmds/realpath.rst +++ b/doc_src/cmds/realpath.rst @@ -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. diff --git a/doc_src/cmds/test.rst b/doc_src/cmds/test.rst index 4871467a7..dcb610efe 100644 --- a/doc_src/cmds/test.rst +++ b/doc_src/cmds/test.rst @@ -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 ] ]``). diff --git a/doc_src/cmds/time.rst b/doc_src/cmds/time.rst index e33ff2c3c..2521b1c21 100644 --- a/doc_src/cmds/time.rst +++ b/doc_src/cmds/time.rst @@ -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 `.