Skip to content

These docs are for the newly-released v4.

If you are or were using v3, check out What's New. If you are or were using v3 and do advanced configuration, read the migration guide and/or read about pinning v3.x.

 

 

Hometown Prompt GitHub release (latest by date including pre-releases) GitHub commits since latest release (by SemVer including pre-releases)

splash card: the text 'Hometown Prompt' as pink cursive neon lettering

Hometown is a feature rich, high performance Git-aware zsh theme with segments for the user, host, time, the current working directory and its parent, and —within a Git repo— detailed Git status. It is carefully designed to show a lot of information clearly.

Here’s the default configuration in action.

Toggle to show/hide an annotated transcript
shell
mkdir -p repo/child/grandchild/great-grandchild
cd repo

# cwd changes to current dir
# previous prompt simplifies: cwd has only one segment

git init

# cwd changes to underline Git repo root; Git branch and its appear

cd child

# cwd changes to current dir. segments start at repo root's parent

cd grandchild

# cwd changes as before
# previous prompt simplifies: cwd starts at the repo root

cd great-grandchild

# cwd changes. shows at most repo root's parent, repo root, ellipsis, cwd parent, cwd

git init

# cwd changes to underlined repo root, and parent

touch x y

# Git status changes

git add -A

# Git status changes, Git branch color changes

git commit -m first

# Git status changes, Git branch color changes

git switch -c feature

# Git branch changes, Git branch color changes

echo wip >> x

# Git status changes, Git branch color changes

git stash

# Git stash appears, Git status changes, Git branch color changes

echo a >> x

# Git status changes

rm y

# Git status changes

git add .

# Git status changes

git commit -m second

# Git status changes, Git branch color changes

git stash drop

# Git stash disappears

git switch main

# Git branch changes

echo b >> x

# Git status changes, Git branch color changes

git commit -am third

# Git status changes, Git branch color changes

git rebase @ feature

# Git HEAD changes, Git HEAD color changes, Git status changes, Git action appears, prompt character color changes

git checkout —ours x

# Git status changes, Git action appears, prompt character color changes

git add x

# Git HEAD changes, Git HEAD color changes, Git status changes, Git action appears

git rebase —continue —no-edit

Appearance

By default it looks something like this. Time, current working directory, and Git ref info on the first line (using symbols, with inactive status data points hidden); Git file info on the second (using symbols, with disabled symbols for inactive status data points); and the prompt character on the third.

Hometown Prompt screenshot, default configuration

It has numerous layout and content toggles.

For example you can mix and match line break options, hidden/disabled options, and word/symbol options in any way you like.

With very little configuration it can look, for example, like this. Time, current working directory, Git ref info (using symbols, with inactive status data points hidden); and Git file info (using symbols, with inactive status data points hidden) on the first line; and the prompt character on the second.

Hometown Prompt screenshot, default configuration

Or like this. Time and current working directory on the first line; Git ref info (using words, with disabled symbols for inactive branch data points) on the second line; Git file info (using words, with inactive status data points hidden) on the third line; and the prompt character on the fourth.

Hometown Prompt screenshot, default configuration

You can also customize colors, text, symbols, and the slot which in these screenshots is the time. Here’s just one of the infinite possibilities:

Hometown Prompt screenshot, custom configuration