My shell prompt
Handle unlinked directory in a nicer way
Update screenshot
Update default theme


browse  log 



You can also use your local clone with git send-email.

#Owl's prompt

Basic prompt that's fairly small and fast. It's about 20 KiB, does not do heap allocation, and has no runtime dependencies (on Linux anyway).


  • Git tree/index status, with various styles available.
  • Sets terminal title to include the working directory.
  • Communicates working directory to new terminal instances, if supported.
  • Color theme can be changed; runtime theming might be supported at some point.
  • Timestamp can be shown to the right of the prompt.
  • Shows exit code of the last command if not 0.

Run zig build --help to see the available options.

Prompt screenshot


With a recent zig:

zig build -Drelease-small --prefix ~/.local # or elsewhere in your $PATH

# build for zsh instead of bash, which is the default
zig build -Dshell=zsh -Drelease-small --prefix ~/.local

You can change the shell and prompt string with build options.


In your .bashrc:

PS1="\$(prompt \$?)"

Examples for bash and zsh can be found in contrib.