Interactive Demo & Configurator

On this page you can see how Hometown Prompt responds to context (user, host, Git status, etc).

You can also experiment with customizing your configuration.

TIP

No custom configuration is required. Hometown Prompt works right out of the box.

Custom content and the prompt character are printed with prompt expansion, with PROMPT_SUBST and PROMPT_PERCENT. For example, the default prompt char %% is rendered as %, and the default custom content %* is rendered as the 24-hour HH:MM:SS time.

olets@dev
%*
olets/hometown-prompt
main
??UU_D_MA_D_M_
%%

Custom configuration ready for copying and pasting into your .zshrc:

Context

Terminal

ContextValue

User

ContextValue

Session

ContextValue

Directory

ContextValue

Git ref

Context Notes Value
Only relevant when on a branch
Only relevant when on a branch
Only relevant when on a branch
Only relevant when on a branch with a remote
Only relevant when on a branch with a remote

Triangular workflow

Context Notes Value
Only relevant when on a branch
Only relevant when on a branch with a distinct push remote
Only relevant when on a branch with a distinct push remote
Only relevant when on a branch with a distinct push remote

Git status

ContextValue

Extended Git status

ContextValue

Hometown Prompt Configuration

For detailed documentation of these options, see the Options page.

Content Options

See Options > Content for details.

OptionDefaultType Notes Value
%*stringIn the terminal, this is printed with prompt expansion with PROMPT_SUBST and PROMPT_PERCENT
1integerundefined

Layout Options

See Options > Layout for details.

OptionDefaultTypeValue
1integer
1integer

* Git ref info is branch or commit, ahead/behind counts, remote name(s), and tag. See the GIT_PROMPT_KIT_REF docs.

Git Prompt Kit Configuration

Hometown Prompt is made almost entirely of Git Prompt Kit components. So almost all of configuration —color customization, symbol customization, dimming vs hiding inactive elements, the number of path segments shows, etc— is done by configuring through Git Prompt Kit. (Git Prompt Kit is bundled with Hometown Prompt, so no additional download is necessary.) For detailed documentations of these options, see the Git Prompt Kit's options documentation.

Behavior Options

See Git Prompt Kit's options' documentation for details.

OptionDefaultTypeValue
1integer
1integer
1integer
1integer

Color Options

See Git Prompt Kit's options' documentation for details.

OptionDefaultType Notes Value
199colorANSI or hex
81colorANSI or hex
39colorANSI or hex
88colorANSI or hex
140colorANSI or hex
109colorANSI or hex
247colorANSI or hex
111colorANSI or hex
216colorANSI or hex
81colorANSI or hex
120colorANSI or hex
81colorANSI or hex
76colorANSI or hex
86colorANSI or hex
162colorANSI or hex
109colorANSI or hex

Content Options

See Git Prompt Kit's options' documentation for details.

OptionDefaultType Notes Value
1integerundefined
upstreamstringundefined
originstringundefined
()arrayMust be in parentheses
Must match /\(.*\)/
()arrayMust be in parentheses
Must match /\(.*\)/
1integerundefined
0integerundefined

Symbol Options

See Git Prompt Kit's options' documentation for details.

OptionDefault Verbose Default Type Notes Value
+ahead stringundefined
aheadundefined
assumed-unchangedstringundefined
assumed-unchangedundefined
-behind stringundefined
behindundefined
branch: stringundefined
%%stringRendered as a prompt string. The default renders as %
#stringundefined
commit: stringundefined
UU conflictedstringundefined
conflictedundefined
_D deletedstringundefined
deletedundefined
D_ staged-deletedstringundefined
staged-deletedundefined
@ host: stringundefined
localstringundefined
_M modifiedstringundefined
modifiedundefined
M_ modified-stagedstringundefined
modified-stagedundefined
A_ newstringundefined
newundefined
@{push}push remote: stringundefined
@{u}remote: stringundefined
skip-worktreestringundefined
skip-worktreeundefined
stashesstringundefined
stashesundefined
@tag: stringundefined
?? untrackedstringundefined
untrackedundefined
**The default if GIT_PROMPT_KIT_VERBOSE_DEFAULT_SYMBOLS is non-zero.