docs: use :doc: role when referencing entire pages

No need to define "cmd-foo" anchors; use :doc:`foo <cmds/foo>`
instead. If we want "cmd-foo" but it should be tested.

See also 38b24c2325 (docs: Use :doc: role when linking to commands,
2022-09-23).
This commit is contained in:
Johannes Altmanninger
2025-11-05 13:44:42 +01:00
parent 2cd60077e6
commit 7a59540517
117 changed files with 20 additions and 258 deletions

View File

@@ -919,7 +919,7 @@ Notable improvements and fixes
which expands ``!!`` to the last history item, anywhere on the command line, mimicking other shells' history expansion.
See :ref:`the documentation <cmd-abbr>` for more.
See :doc:`the documentation <cmds/abbr>` for more.
- ``path`` gained a new ``mtime`` subcommand to print the modification time stamp for files. For example, this can be used to handle cache file ages (:issue:`9057`)::
> touch foo
@@ -1344,7 +1344,7 @@ Scripting improvements
two
'blue '
- ``$fish_user_paths`` is now automatically deduplicated to fix a common user error of appending to it in config.fish when it is universal (:issue:`8117`). :ref:`fish_add_path <cmd-fish_add_path>` remains the recommended way to add to $PATH.
- ``$fish_user_paths`` is now automatically deduplicated to fix a common user error of appending to it in config.fish when it is universal (:issue:`8117`). :doc:`fish_add_path <cmds/fish_add_path>` remains the recommended way to add to $PATH.
- ``return`` can now be used outside functions. In scripts, it does the same thing as ``exit``. In interactive mode,it sets ``$status`` without exiting (:issue:`8148`).
- An oversight prevented all syntax checks from running on commands given to ``fish -c`` (:issue:`8171`). This includes checks such as ``exec`` not being allowed in a pipeline, and ``$$`` not being a valid variable. Generally, another error was generated anyway.
- ``fish_indent`` now correctly reformats tokens that end with a backslash followed by a newline (:issue:`8197`).

View File

@@ -1,5 +1,3 @@
.. _cmd-_:
_ - call fish's translations
============================

View File

@@ -1,5 +1,3 @@
.. _cmd-abbr:
abbr - manage fish abbreviations
================================

View File

@@ -1,5 +1,3 @@
.. _cmd-alias:
alias - create a function
=========================

View File

@@ -1,5 +1,3 @@
.. _cmd-and:
and - conditionally execute a command
=====================================

View File

@@ -1,5 +1,3 @@
.. _cmd-argparse:
argparse - parse options passed to a fish script or function
============================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-begin:
begin - start a new block of code
=================================

View File

@@ -1,5 +1,3 @@
.. _cmd-bg:
bg - send jobs to background
============================

View File

@@ -1,5 +1,3 @@
.. _cmd-bind:
bind - handle fish key bindings
===============================
Synopsis

View File

@@ -1,5 +1,3 @@
.. _cmd-block:
block - temporarily block delivery of events
============================================

View File

@@ -1,5 +1,3 @@
.. _cmd-break:
break - stop the current inner loop
===================================

View File

@@ -1,5 +1,3 @@
.. _cmd-breakpoint:
breakpoint - launch debug mode
==============================

View File

@@ -1,5 +1,3 @@
.. _cmd-builtin:
builtin - run a builtin command
===============================

View File

@@ -1,5 +1,3 @@
.. _cmd-case:
case - conditionally execute a block of commands
================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-cd:
cd - change directory
=====================

View File

@@ -1,5 +1,3 @@
.. _cmd-cdh:
cdh - change to a recently visited directory
============================================

View File

@@ -1,5 +1,3 @@
.. _cmd-command:
command - run a program
=======================

View File

@@ -1,5 +1,3 @@
.. _cmd-commandline:
commandline - set or get the current command line buffer
========================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-complete:
complete - edit command-specific tab-completions
================================================
@@ -16,7 +14,7 @@ Description
``complete`` defines, removes or lists completions for a command.
For an introduction to writing your own completions, see :ref:`Writing your own completions <completion-own>` in
For an introduction to writing your own completions, see :doc:`Writing your own completions <../completions>` in
the fish manual.
The following options are available:

View File

@@ -1,5 +1,3 @@
.. _cmd-contains:
contains - test if a word is present in a list
==============================================

View File

@@ -1,5 +1,3 @@
.. _cmd-continue:
continue - skip the remainder of the current iteration of the current inner loop
================================================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-count:
count - count the number of elements of a list
================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-dirh:
dirh - print directory history
==============================

View File

@@ -1,5 +1,3 @@
.. _cmd-dirs:
dirs - print directory stack
============================

View File

@@ -1,5 +1,3 @@
.. _cmd-disown:
disown - remove a process from the list of jobs
===============================================

View File

@@ -1,5 +1,3 @@
.. _cmd-echo:
echo - display a line of text
=============================

View File

@@ -1,5 +1,3 @@
.. _cmd-else:
else - execute command if a condition is not met
================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-emit:
emit - emit a generic event
===========================

View File

@@ -1,5 +1,3 @@
.. _cmd-end:
end - end a block of commands
=============================

View File

@@ -1,5 +1,3 @@
.. _cmd-eval:
eval - evaluate the specified commands
======================================

View File

@@ -1,5 +1,3 @@
.. _cmd-exec:
exec - execute command in current process
=========================================

View File

@@ -1,6 +1,3 @@
.. _cmd-exit:
.. program::exit
exit - exit the shell
=====================

View File

@@ -1,5 +1,3 @@
.. _cmd-export:
export - compatibility function for exporting variables
=======================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-false:
false - return an unsuccessful result
=====================================

View File

@@ -1,5 +1,3 @@
.. _cmd-fg:
fg - bring job to foreground
============================

View File

@@ -1,6 +1,3 @@
.. _cmd-fish:
.. program::fish
fish - the friendly interactive shell
=====================================
@@ -18,7 +15,7 @@ Description
:command:`fish` is a command-line shell written mainly with interactive use in mind.
This page briefly describes the options for invoking :command:`fish`.
The :ref:`full manual <intro>` is available in HTML by using the :command:`help` command from inside fish, and in the `fish-doc(1)` man page.
The :ref:`tutorial <tutorial>` is available as HTML via ``help tutorial`` or in `man fish-tutorial`.
The :doc:`tutorial <../tutorial>` is available as HTML via ``help tutorial`` or in `man fish-tutorial`.
The following options are available:

View File

@@ -1,6 +1,3 @@
.. _cmd-fish_add_path:
.. program::fish_add_path
fish_add_path - add to the path
==============================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-fish_breakpoint_prompt:
fish_breakpoint_prompt - define the prompt when stopped at a breakpoint
=======================================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-fish_clipboard_copy:
fish_clipboard_copy - copy text to the system's clipboard
==============================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-fish_clipboard_paste:
fish_clipboard_paste - get text from the system's clipboard
==============================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-fish_command_not_found:
fish_command_not_found - what to do when a command wasn't found
===============================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-fish_config:
fish_config - start the web-based configuration interface
=========================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-fish_default_key_bindings:
fish_default_key_bindings - set emacs key bindings for fish
===============================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-fish_git_prompt:
fish_git_prompt - output git information for use in a prompt
============================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-fish_greeting:
fish_greeting - display a welcome message in interactive shells
===============================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-fish_hg_prompt:
fish_hg_prompt - output Mercurial information for use in a prompt
=================================================================

View File

@@ -1,6 +1,3 @@
.. _cmd-fish_indent:
.. program::fish_indent
fish_indent - indenter and prettifier
=====================================

View File

@@ -1,5 +1,3 @@
.. _cmd-fish_is_root_user:
fish_is_root_user - check if the current user is root
=====================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-fish_key_reader:
fish_key_reader - explore what characters keyboard keys send
============================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-fish_mode_prompt:
fish_mode_prompt - define the appearance of the mode indicator
==============================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-fish_opt:
fish_opt - create an option specification for the argparse command
==================================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-fish_prompt:
fish_prompt - define the appearance of the command line prompt
==============================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-fish_right_prompt:
fish_right_prompt - define the appearance of the right-side command line prompt
===============================================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-fish_should_add_to_history:
fish_should_add_to_history - decide whether a command should be added to the history
====================================================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-fish_status_to_signal:
fish_status_to_signal - convert exit codes to human-friendly signals
====================================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-fish_svn_prompt:
fish_svn_prompt - output Subversion information for use in a prompt
===================================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-fish_title:
fish_title - define the terminal's title
========================================

View File

@@ -1,5 +1,3 @@
.. _cmd-fish_update_completions:
fish_update_completions - update completions using manual pages
===============================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-fish_vcs_prompt:
fish_vcs_prompt - output version control system information for use in a prompt
===============================================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-fish_vi_key_bindings:
fish_vi_key_bindings - set vi key bindings for fish
===============================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-for:
for - perform a set of commands multiple times
==============================================

View File

@@ -1,5 +1,3 @@
.. _cmd-funced:
funced - edit a function interactively
======================================

View File

@@ -1,5 +1,3 @@
.. _cmd-funcsave:
funcsave - save the definition of a function to the user's autoload directory
=============================================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-function:
function - create a function
============================

View File

@@ -1,5 +1,3 @@
.. _cmd-functions:
functions - print or erase functions
====================================

View File

@@ -1,5 +1,3 @@
.. _cmd-help:
help - display fish documentation
=================================

View File

@@ -1,5 +1,3 @@
.. _cmd-history:
history - show and manipulate command history
=============================================

View File

@@ -1,5 +1,3 @@
.. _cmd-if:
if - conditionally execute a command
====================================

View File

@@ -1,5 +1,3 @@
.. _cmd-isatty:
isatty - test if a file descriptor is a terminal
================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-jobs:
jobs - print currently running jobs
===================================

View File

@@ -1,5 +1,3 @@
.. _cmd-math:
math - perform mathematics calculations
=======================================

View File

@@ -1,5 +1,3 @@
.. _cmd-nextd:
nextd - move forward through directory history
==============================================

View File

@@ -1,5 +1,3 @@
.. _cmd-not:
not - negate the exit status of a job
=====================================

View File

@@ -1,5 +1,3 @@
.. _cmd-open:
open - open file in its default application
===========================================

View File

@@ -1,5 +1,3 @@
.. _cmd-or:
or - conditionally execute a command
====================================

View File

@@ -1,5 +1,3 @@
.. _cmd-path:
path - manipulate and check paths
=================================

View File

@@ -1,5 +1,3 @@
.. _cmd-popd:
popd - move through directory stack
===================================

View File

@@ -1,5 +1,3 @@
.. _cmd-prevd:
prevd - move backward through directory history
===============================================

View File

@@ -1,5 +1,3 @@
.. _cmd-printf:
printf - display text according to a format string
==================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-prompt_hostname:
prompt_hostname - print the hostname, shortened for use in the prompt
=====================================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-prompt_login:
prompt_login - describe the login suitable for prompt
=====================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-prompt_pwd:
prompt_pwd - print pwd suitable for prompt
==========================================

View File

@@ -1,5 +1,3 @@
.. _cmd-psub:
psub - perform process substitution
===================================

View File

@@ -1,5 +1,3 @@
.. _cmd-pushd:
pushd - push directory to directory stack
=========================================

View File

@@ -1,5 +1,3 @@
.. _cmd-pwd:
pwd - output the current working directory
==========================================

View File

@@ -1,5 +1,3 @@
.. _cmd-random:
random - generate random number
===============================

View File

@@ -1,5 +1,3 @@
.. _cmd-read:
read - read line of input into variables
========================================

View File

@@ -1,6 +1,3 @@
.. _cmd-realpath:
.. program::realpath
realpath - convert a path to an absolute path without symlinks
==============================================================

View File

@@ -1,6 +1,3 @@
.. _cmd-return:
.. program::return:
return - stop the current inner function
========================================

View File

@@ -1,5 +1,3 @@
.. _cmd-set:
set - display and change shell variables
========================================

View File

@@ -1,5 +1,3 @@
.. _cmd-set_color:
set_color - set the terminal color
==================================

View File

@@ -1,5 +1,3 @@
.. _cmd-source:
source - evaluate contents of file
==================================

View File

@@ -1,5 +1,3 @@
.. _cmd-status:
status - query fish runtime information
=======================================

View File

@@ -1,5 +1,3 @@
.. _cmd-string-length:
string-length - print string lengths
====================================

View File

@@ -88,7 +88,7 @@ See Also
.. BEGIN SEEALSO
- :ref:`string<cmd-string>`'s ``pad`` subcommand does the inverse of this command, adding padding to a specific width instead.
- :doc:`string pad <string-pad>` does the inverse of this command, adding padding to a specific width instead.
- The :doc:`printf <printf>` command can do simple padding, for example ``printf %10s\n`` works like ``string pad -w10``.

View File

@@ -1,5 +1,3 @@
.. _cmd-string:
string - manipulate strings
===========================
@@ -51,8 +49,6 @@ Most subcommands accept a **-q** or **--quiet** switch, which suppresses the usu
The following subcommands are available.
.. _cmd-string-collect:
"collect" subcommand
--------------------
@@ -236,9 +232,6 @@ Examples
:start-after: BEGIN EXAMPLES
:end-before: END EXAMPLES
.. _cmd-string-split:
.. _cmd-string-split0:
"split" and "split0" subcommands
--------------------------------

View File

@@ -1,5 +1,3 @@
.. _cmd-suspend:
suspend - suspend the current shell
===================================

View File

@@ -1,5 +1,3 @@
.. _cmd-switch:
switch - conditionally execute a block of commands
==================================================

View File

@@ -1,5 +1,3 @@
.. _cmd-test:
test - perform tests on files and text
======================================

View File

@@ -1,5 +1,3 @@
.. _cmd-time:
time - measure how long a command or block takes
================================================

Some files were not shown because too many files have changed in this diff Show More