mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-27 06:31:19 -03:00
No need to define "cmd-foo" anchors; use :doc:`foo <cmds/foo>`
instead. If we want "cmd-foo" but it should be tested.
See also 38b24c2325 (docs: Use :doc: role when linking to commands,
2022-09-23).
32 lines
664 B
ReStructuredText
32 lines
664 B
ReStructuredText
fish_status_to_signal - convert exit codes to human-friendly signals
|
|
====================================================================
|
|
|
|
Synopsis
|
|
--------
|
|
|
|
.. 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
|