Builtin Extensions¶
ansicolor¶
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 colorbg: Background colorstyle: A list of space-separated styles to apply to the text:boldfaintitalicunderlineblinkblink2negativeconcealedcrossed
Example:
dish.config['PS1'] = '<color bg="blue" style="italic bold">This is some text</color> <color fg="green">$</color> '
prompt_goodies¶
This extension adds system-related values that you can insert into your prompt. These are the tags that it defins:
<cwd/>Returns the current working directory.
<git-branch/>Returns the active Git branch.
<platform name="..."/>Returns something from the
platformmodule. For example,<platform name="node"/>returns the value ofplatform.node().<version/>Returns the installed version of Dish.
These are the prompt predicates that it defins:
gitReturns
Trueif the current working directory is in a Git repository.