FISH_STATUS_TO_SIGNAL(1)
π¦ FISH_STATUS_TO_SIGNAL(1) π¦
okay bestie so this is a page from the fish-shell manual (yes, that fish-shell, the iconic one β¨) and it's about turning boring little numbers into β¨ signals β¨. let's get into it π
πΈ NAME πΈ
fish_status_to_signal β it converts exit codes into human-friendly signals, no cap π
β¨ SYNOPSIS β¨
fish_status_to_signal NUM
and here's the literal glow-up of a prompt function they show you, bestie look:
function fish_prompt
echo -n (fish_status_to_signal $pipestatus | string join '|') (prompt_pwd) '$ '
end
main character prompt energy, fr fr π
π DESCRIPTION π
so fish_status_to_signal takes exit codes and converts them into their corresponding human-friendly signals β if one exists, okay? π like, it's not gonna manifest a signal out of thin air, it just maps the ones that actually have a match.
and lowkey the whole point? it's likely to be useful for prompts, especially when you pair it with the $status and $pipestatus variables. that's the vibe check. prompts + these variables + this function = chef's kiss π
π EXAMPLE π
watch this, it's giving demonstration:
>_ sleep 5
^Cβ
>_ fish_status_to_signal $status
SIGINT
you hit Ctrl+C, the sleep gets interrupted, and boom β SIGINT comes back at you. ate. π
β¨
π§ Copyright π§
fish-shell developers β they made this, we're just living in it π«Ά
okay that's the whole thing, hope it slayed for you ππ
β° cute lil sign-off: this page is from fish-shell, version 4.9, dated Sep 08, 2026 β write that down bestie, iykyk ππ
π¦ where this page comes from
- arch rolling: fish 4.9.3-1 Β· GPL-2.0-only AND BSD-3-Clause AND ISC AND MIT AND PSF-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms