ZSH precmd written in Go.
Find a file
2026-06-19 09:47:43 +01:00
internal jj: handle case where unique prefix is entire shortest id 2026-05-15 11:24:17 +01:00
.gitignore add .gitignore 2026-04-17 22:06:47 +01:00
args.go VCS section is opt-in 2026-06-19 09:47:43 +01:00
go.mod init go project 2026-04-17 21:58:35 +01:00
justfile take --columns arg 2026-04-17 22:17:22 +01:00
LICENSE.md add readme and license 2026-04-17 22:01:37 +01:00
logger.go debug log errors 2026-04-19 15:16:08 +01:00
main.go VCS section is opt-in 2026-06-19 09:47:43 +01:00
README.md VCS section is opt-in 2026-06-19 09:47:43 +01:00
sections.go use goroutines to 2x performance on large jj repos 2026-06-12 16:27:39 +01:00

HUD

A ZSH status bar written in Go, intended to be used as the precmd.

There is minimal configuration, everything is defined in the code. Run just build to recompile after updating the prompt.

For performance, the version control section is opt-in. Pass the --vcs flag to enable.

Examples

Showing Git status:

─────╢ 18:32 ╟─────╢ 0 ╟─────────────────────────────────────╢ main* u+3 ╟─────

Showing Jujutsu status:

─────╢ 18:32 ╟─────╢ 0 ╟─────────────────╢ vkvz main ↥1 Update README.md ╟─────

Usage

hud --columns=$COLUMNS

ZSH Configuration

Run just build to compile the hud binary and add it to your $PATH.

PATH="$PATH:$HOME/path/to/hud/bin"

Configure the HUD to run as your precmd.

precmd () {
    # Important: capture exit code before running anything else
    exitcode="$?"
    if command -v hud &>/dev/null; then
        hud --columns="$COLUMNS" --exit-code="$exitcode"
    fi
}