Skip to main content

Hint Text

Laurence MorganAbout 1 minUser GuideRead More

Hint Text

A status bar for your shell

Overview

The hint text is a (typically) blue status line that appears directly below your prompt. The idea behind the hint text is to provide clues to you as type instructions into the prompt; but without adding distractions. It is there to be used if you want it while keeping out of the way when you don't want it.

rsync flag, with example, pulled from man pages
egrep is an alias, so also show the destination command

Configuring Hint Text Colour

By default the hint text will appear blue. This is also customizable:

» config get shell hint-text-formatting
{BLUE}

The formatting config takes a string and supports ANSI constants.

It is also worth noting that if colour is disabled then the hint text will not be coloured even if hint-text-formatting includes colour codes:

» config set shell color false

(please note that syntax highlighting is unaffected by the above config)

Custom Hint Text Statuses

There is a lot of behavior hardcoded into Murex like displaying the full path to executables and the values of variables. However if there is no status to be displayed then Murex can fallback to a default hint text status. This default is a user defined function. At time of writing this document the author has the following function defined:

config set shell hint-text-func {
    trypipe <!null> {
        git status --porcelain -b -> set gitstatus
        $gitstatus -> head -n1 -> regexp 's/^## //' -> regexp 's/\.\.\./ => /'
    }
    catch {
        out "Not a git repository."
    }
}

...which produces a colorized status that looks something like the following:

develop => origin/develop

Starship Example

The following screenshot is of a custom hint text using Starship:

Source: https://github.com/orefalo/murex-module-starshipopen in new window

Disabling Hint Text

It is enabled by default but can be disabled if you prefer a more minimal prompt:

» config set shell hint-text-enabled false

See Also


This document was generated from gen/user-guide/hint-text_doc.yamlopen in new window.

Last update:
Contributors: Laurence Morgan