fix `var`nings
add some i18n
move date back to the right side
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).
0
.Color theme can be changed; runtime theming might be supported at some point.
Run zig build --help
to see the available options.
With a recent zig:
# some features are `$SHELL`-specific
zig build -Dshell="$SHELL" --Doptimize=ReleaseSmall -prefix ~/.local
# build for zsh instead of bash, which is the default
zig build -Dshell=zsh -Doptimize=ReleaseSmall --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
.