Docs: Switch back to vanilla :ref: for commands that should be linked

Unfortunately, currently :program: doesn't link to the program's page.

So we use the old-school :ref: again where we should link, i.e. for
everything that's not the program the current page is about.

Fixes #8438
This commit is contained in:
Fabian Homborg
2021-11-12 18:02:56 +01:00
parent 2e9e94f17e
commit edc09c8419
8 changed files with 16 additions and 10 deletions

View File

@@ -1,3 +1,4 @@
.. _cmd-exit:
.. program::exit
exit - exit the shell
@@ -14,4 +15,4 @@ Description
``exit`` is a special builtin that causes the shell to exit. Either 255 or the *code* supplied is used, whichever is lesser.
Otherwise, the exit status will be that of the last command executed.
If exit is called while sourcing a file (using the :program:`source` builtin) the rest of the file will be skipped, but the shell itself will not exit.
If exit is called while sourcing a file (using the :ref:`source <cmd-source>` builtin) the rest of the file will be skipped, but the shell itself will not exit.

View File

@@ -1,3 +1,4 @@
.. _cmd-fish:
.. program::fish
fish - the friendly interactive shell

View File

@@ -1,3 +1,4 @@
.. _cmd-fish_add_path:
.. program::fish_add_path
fish_add_path - add to the path
@@ -18,7 +19,7 @@ Description
It is (by default) safe to use :program:`fish_add_path` in config.fish, or it can be used once, interactively, and the paths will stay in future because of :ref:`universal variables <variables-universal>`. This is a "do what I mean" style command, if you need more control, consider modifying the variable yourself.
Components are normalized by :program:`realpath`. Trailing slashes are ignored and relative paths are made absolute (but symlinks are not resolved). If a component already exists, it is not added again and stays in the same place unless the ``--move`` switch is given.
Components are normalized by :ref:`realpath <cmd-realpath>`. Trailing slashes are ignored and relative paths are made absolute (but symlinks are not resolved). If a component already exists, it is not added again and stays in the same place unless the ``--move`` switch is given.
Components are added in the order they are given, and they are prepended to the path unless ``--append`` is given (if $fish_user_paths is used, that means they are last in $fish_user_paths, which is itself prepended to $PATH, so they still stay ahead of the system paths).

View File

@@ -1,3 +1,4 @@
.. _cmd-fish_indent:
.. program::fish_indent
fish_indent - indenter and prettifier
@@ -28,7 +29,7 @@ The following options are available:
- ``--html`` outputs HTML, which supports syntax highlighting if the appropriate CSS is defined. The CSS class names are the same as the variable names, such as ``fish_color_command``.
- ``-d`` or ``--debug=DEBUG_CATEGORIES`` enable debug output and specify a pattern for matching debug categories. See :ref:`Debugging <debugging-fish>` in :program:`fish` (1) for details.
- ``-d`` or ``--debug=DEBUG_CATEGORIES`` enable debug output and specify a pattern for matching debug categories. See :ref:`Debugging <debugging-fish>` in :ref:`fish <cmd-fish>` (1) for details.
- ``-o`` or ``--debug-output=DEBUG_FILE`` specify a file path to receive the debug output, including categories and ``fish_trace``. The default is stderr.

View File

@@ -1,3 +1,4 @@
.. _cmd-realpath:
.. program::realpath
realpath - convert a path to an absolute path without symlinks
@@ -11,7 +12,7 @@ Synopsis
Description
-----------
:program:`realpath` follows all symbolic links encountered for the provided :envvar:`PATH`, printing the absolute path resolved. :program:`fish` provides a :command:`realpath`-alike builtin intended to be enrich systems where no such command is installed by default.
:program:`realpath` follows all symbolic links encountered for the provided :envvar:`PATH`, printing the absolute path resolved. :ref:`fish <cmd-fish>` provides a :command:`realpath`-alike builtin intended to be enrich systems where no such command is installed by default.
If a :command:`realpath` command exists, that will be preferred.
``builtin realpath`` will explicitly use the fish implementation of :command:`realpath`.

View File

@@ -1,3 +1,4 @@
.. _cmd-return:
.. program::return:
return - stop the current inner function
@@ -15,9 +16,9 @@ Description
The exit status is set to ``n`` if it is given.
If :program:`return` is invoked outside of a function or dot script it is equivalent to exit.
It is often added inside of a conditional block such as an :program:`if` statement or a :program:`switch` statement to conditionally stop the executing function and return to the caller; it can also be used to specify the exit status of a function.
It is often added inside of a conditional block such as an :ref:`if <cmd-if>` statement or a :ref:`switch <cmd-switch>` statement to conditionally stop the executing function and return to the caller; it can also be used to specify the exit status of a function.
If at the top level of a script, it exits with the given status, like :program:`exit`.
If at the top level of a script, it exits with the given status, like :ref:`exit <cmd-exit>`.
If at the top level in an interactive session, it will set :envvar:`status`, but not exit the shell.
Example