2021-01-03 14:15:57 +00:00
|
|
|
.. _cmd-fish_status_to_signal:
|
|
|
|
|
2021-12-02 17:36:45 +00:00
|
|
|
fish_status_to_signal - convert exit codes to human-friendly signals
|
2021-01-03 14:15:57 +00:00
|
|
|
====================================================================
|
|
|
|
|
|
|
|
Synopsis
|
|
|
|
--------
|
|
|
|
|
2021-12-17 23:16:47 +00:00
|
|
|
``fish_status_to_signal`` *NUM*
|
2021-01-03 14:15:57 +00:00
|
|
|
::
|
|
|
|
|
|
|
|
function fish_prompt
|
|
|
|
echo -n (fish_status_to_signal $pipestatus | string join '|') (prompt_pwd) '$ '
|
|
|
|
end
|
|
|
|
|
|
|
|
Description
|
|
|
|
-----------
|
|
|
|
|
|
|
|
``fish_status_to_signal`` converts exit codes to their corresponding human-friendly signals if one exists.
|
|
|
|
This is likely to be useful for prompts in conjunction with the ``$status`` and ``$pipestatus`` variables.
|
|
|
|
|
|
|
|
Example
|
|
|
|
-------
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
>_ sleep 5
|
|
|
|
^C⏎
|
|
|
|
>_ fish_status_to_signal $status
|
2021-12-17 23:16:47 +00:00
|
|
|
SIGINT
|