Back to Fish

fish_breakpoint_prompt - define the prompt when stopped at a breakpoint¶

docs/docs/4.2/cmds/fish_breakpoint_prompt.html

latest1.2 KB
Original Source

fish_breakpoint_prompt - define the prompt when stopped at a breakpoint

Synopsis

fish\_breakpoint\_prompt
function fish\_breakpoint\_prompt...end

Description

fish_breakpoint_prompt is the prompt function when asking for input in response to a breakpoint command.

The exit status of commands within fish_breakpoint_prompt will not modify the value of $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