ZSH precmd written in Go.
Find a file
2026-04-20 14:47:59 +01:00
internal jj: show distance from bookmark as +/- 2026-04-20 14:46:02 +01:00
.gitignore add .gitignore 2026-04-17 22:06:47 +01:00
args.go debug log errors 2026-04-19 15:16:08 +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 debug log errors 2026-04-19 15:16:08 +01:00
README.md Add examples to documentation 2026-04-18 18:42:16 +01:00
sections.go jj: restore space between bookmark name and distance 2026-04-20 14:47:59 +01:00

HUD

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

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

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
}