mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-29 06:13:20 +00:00
dca6eee55f
The person reading this is "you". It's completely okay and sounds better to address them directly. When we're talking about OS users or users of fish script the reader writes, "the user" is still okay. [ci skip]
37 lines
1.1 KiB
ReStructuredText
37 lines
1.1 KiB
ReStructuredText
.. _cmd-fish_breakpoint_prompt:
|
|
|
|
fish_breakpoint_prompt - define the prompt when stopped at a breakpoint
|
|
=======================================================================
|
|
|
|
Synopsis
|
|
--------
|
|
|
|
::
|
|
|
|
function fish_breakpoint_prompt
|
|
...
|
|
end
|
|
|
|
|
|
Description
|
|
-----------
|
|
|
|
``fish_breakpoint_prompt`` is the prompt function when asking for input in response to a :ref:`breakpoint <cmd-breakpoint>` command.
|
|
|
|
The exit status of commands within ``fish_breakpoint_prompt`` will not modify the value of :ref:`$status <variables-status>` outside of the ``fish_breakpoint_prompt`` function.
|
|
|
|
``fish`` ships with a default version of this function that displays the function name and line number of the current execution context.
|
|
|
|
|
|
Example
|
|
-------
|
|
|
|
A simple prompt that is a simplified version of the default debugging prompt::
|
|
|
|
function fish_breakpoint_prompt -d "Write out the debug prompt"
|
|
set -l function (status current-function)
|
|
set -l line (status current-line-number)
|
|
set -l prompt "$function:$line >"
|
|
echo -ns (set_color $fish_color_status) "BP $prompt" (set_color normal) ' '
|
|
end
|
|
|