searocket prompt
May 10, 2026 ยท View on GitHub

NOTE: screenshot uses nerd font with devicons, this is not required.
spaceship prompt is pretty good... but it was getting a bit sluggish for my liking. So I made this slimmed down version which does all the heavy lifting in D.
Build and install
ldc is required to build due to the use of some non standard complier flags.
The prompt can be built using
make
make install
You will need to source the generated searocket.zsh file from your .zshrc.
By default /usr/share/searocket/searocket.zsh, see
Build flags section for details.
echo ". /usr/share/searcoket/searocket.szh" >> ${ZDOTDIR:-$HOME}/.zshrc"
Configuration
All configuration is done at compile time by enabling different compilation flags.
Features can be enabled by modifying the UTILS and INTEGRATIONS arrays
in config.mk.
Enabling more features will cause the prompt to be slower, but this is not very perceptible.
supported features
UTILSdir- Print current directory
exitcode- Print what last command exited with (if it's not 0)
user- Print username
jobs- Is there a background job running
took- How long did the previous command take
INTEGRATIONSbunddevenvelixirelmgitgonixnodejspythonzig
FEATUREStiming- Total execution time for the prompt.
- For debug only
nogc- Do not collect memory
- I was unable to measure any performance difference when using this option
- Currently unsupported:
batterydockerhaskelljavajuliaphprubyrustswiftxcode
source/config.d
See configOpts.md for the full list.
Build flags
| Variable | default |
|---|---|
DC | ldc |
DESTDIR | |
PREFIX | /usr |
ZSH_FILE_LOCATION | ${PREFIX}/share/searocket |
STATIC | (not set) |
MODE | (not set) |
TESTING | (not set) |
Supported values of DC: ldc, ldc2, dmd (LDC highly recommended).
searocket will be installed to ${DESTDIR}${PREFIX}/bin/searocket.
searocket.zsh file will be installed to ${DESTDIR}${ZSH_FILE_LOCATION}/searocket.zsh.
If STATIC is set to a non-empty value and DC is ldc or ldc2, links the binary statically.
If MODE is set to DEBUG, builds in debug mode. This enables all Features, utilities and
integrations (even the unsupported ones). Produces better errors if the prompt crashes. Runs a bit
slower.
If TESTING is specified, running the searocket executable will run the tests, rather than
produce a prompt.
License
Most of the code is written by me and licensed under the MIT license (see
LICENSE file).
Regular expressions used for parsing git status are from the spaceship prompt project and are licensed under the MIT license (see spaceship prompt LICENSE.md).