fish-shell/doc_src/cmds/fish_status_to_signal.rst
Aaron Gyes af61ea1325 doc_src: Continue the slog through the letter F.
We are using only :: in a synopsis for fishscript examples given
of the command being documented.
2021-12-17 15:16:47 -08:00

30 lines
682 B
ReStructuredText

.. _cmd-fish_status_to_signal:
fish_status_to_signal - convert exit codes to human-friendly signals
====================================================================
Synopsis
--------
``fish_status_to_signal`` *NUM*
::
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
SIGINT