FISH_HG_PROMPT(1)
β¨ FISH_HG_PROMPT β¨
okay so bestie, welcome to the fish_hg_prompt(1) page from the fish-shell gang π this is a little function that spilled the tea on your Mercurial repo, and honestly it's giving main character energy.
πΈ NAME πΈ
fish_hg_prompt β literally just spits out Mercurial info so you can flex it in your prompt π
π SYNOPSIS π
fish_hg_prompt
like, that's it. that's the whole call. no cap. but here's how you'd actually wire it into your prompt, because obviously:
function fish_prompt
printf '%s' $PWD (fish_hg_prompt) ' $ '
end
π¦ DESCRIPTION π¦
so fish_hg_prompt shows you the deets about the Mercurial repository you're currently standing in β y'know, if there is one. no repo? it's not gonna invent one, bestie. π
heads up tho: Mercurial (hg) has to be installed, or this whole thing is a no-go. it lives over at <https://www.mercurial-scm.org/> btw, iykyk.
by default it only shows the current branch, and that is lowkey on purpose β because hg status can be mad slow on a big repository π nobody wants a laggy prompt, fr fr. you can unlock a more informative prompt by setting the variable $fish_prompt_hg_show_informative_status, like so:
set fish_prompt_hg_show_informative_status
and if you do turn on the informative status, ohhh bestie there are so many customization options, all controlled with fish variables β¨
here's the color squad β these are the colors used when the repo has the respective status:
$fish_color_hg_clean,$fish_color_hg_modifiedand$fish_color_hg_dirty
and some colors for the status symbols themselves:
$fish_color_hg_added$fish_color_hg_renamed$fish_color_hg_copied$fish_color_hg_deleted$fish_color_hg_untracked$fish_color_hg_unmerged
now for the status symbols themselves, which are fully iconic ngl:
$fish_prompt_hg_status_added, default'β'$fish_prompt_hg_status_modified, default'*'$fish_prompt_hg_status_copied, default'β'$fish_prompt_hg_status_deleted, default'β'$fish_prompt_hg_status_untracked, default'?'$fish_prompt_hg_status_unmerged, default'!'
and finallyyyyy, $fish_prompt_hg_status_order β this one lets you change the order the status symbols show up in π«Ά it defaults to added modified copied deleted untracked unmerged.
also go peep fish_vcs_prompt, which calls all the supported version control prompt functions β git, Mercurial and Subversion included. it's the whole friend group π
π EXAMPLE π
a simple prompt that displays hg info, for your viewing pleasure:
function fish_prompt
...
set -g fish_prompt_hg_show_informative_status
printf '%s %s$' $PWD (fish_hg_prompt)
end
π COPYRIGHT π
copyright belongs to the fish-shell developers π
and that's the whole vibe check, bestie β¨ this was FISH_HG_PROMPT(1) from fish-shell, version 4.9, dated Sep 08, 2026 β slay, go make your prompt cute now ππ
π¦ 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