FISH\_HG\_PROMPT(1) fish-shell FISH\_HG\_PROMPT(1)

# [NAME](#NAME)

fish\_hg\_prompt - output Mercurial information for use in a prompt

# [SYNOPSIS](#SYNOPSIS)

```
fish_hg_prompt
```

```
function fish_prompt


     printf '%s' $PWD (fish_hg_prompt) ' $ '
end
```

# [DESCRIPTION](#DESCRIPTION)

The fish\_hg\_prompt function displays information about the current Mercurial repository, if any.

Mercurial &lt;https://www.mercurial-scm.org/&gt; (**hg**) must be installed.

By default, only the current branch is shown because **hg status** can be slow on a large repository. You can enable a more informative prompt by setting the variable **$fish\_prompt\_hg\_show\_informative\_status**, for example:

```
set fish_prompt_hg_show_informative_status
```

If you enabled the informative status, there are numerous customization options, which can be controlled with fish variables.

•

**$fish\_color\_hg\_clean**, **$fish\_color\_hg\_modified** and **$fish\_color\_hg\_dirty** are colors used when the repository has the respective status.

Some colors for status symbols:

- **$fish\_color\_hg\_added**
- **$fish\_color\_hg\_renamed**
- **$fish\_color\_hg\_copied**
- **$fish\_color\_hg\_deleted**
- **$fish\_color\_hg\_untracked**
- **$fish\_color\_hg\_unmerged**

The status symbols themselves:

- **$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 '!'

Finally, **$fish\_prompt\_hg\_status\_order**, which can be used to change the order the status symbols appear in. It defaults to **added modified copied deleted untracked unmerged**.

See also fish\_vcs\_prompt &lt;&gt;, which will call all supported version control prompt functions, including git, Mercurial and Subversion.

# [EXAMPLE](#EXAMPLE)

A simple prompt that displays hg info:

```
function fish_prompt


    ...


    set -g fish_prompt_hg_show_informative_status


    printf '%s %s$' $PWD (fish_hg_prompt)
end
```

# [Copyright](#Copyright)

fish-shell developers

October 15, 2026 4.9

---

Document: fish_hg_prompt(1) from fish 4.9.3-r3 (Chainguard OS)
Source: https://github.com/fish-shell/fish-shell
