Builtin Extensions


This extension adds ANSI color support for prompts. It adds a new <color> tag which can be used to define ANSI colors and styles. Colors are defined using CSS color names. This tag has the following attributes:

  • fg: Foreground color

  • bg: Background color

  • style: A list of space-separated styles to apply to the text:

    • bold

    • faint

    • italic

    • underline

    • blink

    • blink2

    • negative

    • concealed

    • crossed


dish.config['PS1'] = '<color bg="blue" style="italic bold">This is some text</color> <color fg="green">$</color> '


This extension adds system-related values that you can insert into your prompt. These are the tags that it defins:


Returns the current working directory.


Returns the active Git branch.

<platform name="..."/>

Returns something from the platform module. For example, <platform name="node"/> returns the value of platform.node().


Returns the installed version of Dish.

These are the prompt predicates that it defins:


Returns True if the current working directory is in a Git repository.