mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-01 01:51:14 -03:00
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:
@@ -17,7 +17,7 @@ Shells like fish are used by giving them commands. A command is executed by writ
|
||||
|
||||
echo hello world
|
||||
|
||||
:program:`echo` command writes its arguments to the screen. In this example the output is ``hello world``.
|
||||
:ref:`echo <cmd-echo>` command writes its arguments to the screen. In this example the output is ``hello world``.
|
||||
|
||||
Everything in fish is done with commands. There are commands for repeating other commands, commands for assigning variables, commands for treating a group of commands as a single command, etc. All of these commands follow the same basic syntax.
|
||||
|
||||
@@ -1571,6 +1571,6 @@ For more information on how to define new event handlers, see the documentation
|
||||
Debugging fish scripts
|
||||
----------------------
|
||||
|
||||
Fish includes a built in debugging facility. The debugger allows you to stop execution of a script at an arbitrary point. When this happens you are presented with an interactive prompt. At this prompt you can execute any fish command (there are no debug commands as such). For example, you can check or change the value of any variables using :ref:`printf <cmd-printf>` and :ref:`set <cmd-set>`. As another example, you can run :ref:`status print-stack-trace <cmd-status>` to see how this breakpoint was reached. To resume normal execution of the script, simply type :program:`exit` or :kbd:`Control`\ +\ :kbd:`D`.
|
||||
Fish includes a built in debugging facility. The debugger allows you to stop execution of a script at an arbitrary point. When this happens you are presented with an interactive prompt. At this prompt you can execute any fish command (there are no debug commands as such). For example, you can check or change the value of any variables using :ref:`printf <cmd-printf>` and :ref:`set <cmd-set>`. As another example, you can run :ref:`status print-stack-trace <cmd-status>` to see how this breakpoint was reached. To resume normal execution of the script, simply type :ref:`exit <cmd-exit>` or :kbd:`Control`\ +\ :kbd:`D`.
|
||||
|
||||
To start a debug session simply run the builtin command :ref:`breakpoint <cmd-breakpoint>` at the point in a function or script where you wish to gain control. Also, the default action of the TRAP signal is to call this builtin. So a running script can be debugged by sending it the TRAP signal with the ``kill`` command. Once in the debugger, it is easy to insert new breakpoints by using the funced function to edit the definition of a function.
|
||||
|
||||
Reference in New Issue
Block a user