fish_breakpoint_prompt - ブレークポイントで停止した時のプロンプトを定義する¶
概要¶
fish_breakpoint_prompt
function fish_breakpoint_prompt
...
end
説明¶
fish_breakpoint_prompt は、 breakpoint コマンドに応じて入力を求める際に使用されるプロンプト関数です。
fish_breakpoint_prompt 内で実行されたコマンドの終了ステータスは、 fish_breakpoint_prompt 関数の外側にある $status の値を変更しません。
fish にはこの関数のデフォルトバージョンが付属しており、現在の実行コンテキストの関数名と行番号を表示します。
使用例¶
デフォルトのデバッグプロンプトを簡略化したシンプルなプロンプトの例です:
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 --reset) ' '
end
