You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simple, fast, nice looking and colorful prompt for busybox/(d)ash/ksh/bash/zsh with Git branch, optional Git status indicator and exit status. Much faster than other Git prompts on MSYS2/Cygwin/WSL.
This is a simple, lightweight, and nice looking prompt that runs quickly
even in very slow shells like MSYS2, Cygwin and WSL.
It shows the short name of the current environment (distribution, OS, etc.,) the
git branch when in a git checkout, the last command exit status (green checkmark
for success and red X mark for non-zero exit) and an optional clean/dirty git
status indicator.
This prompt is compatible with bash, zsh and some other POSIX sh
implementations such as busybox, (d)ash, ksh, etc..
To show a clean/dirty git status indicator, set this variable:
SPS_STATUS=1
. This is disabled by default because it makes the prompt much slower on things
like MSYS2/Cygwin, but it will work fine on Linux. You can also try it on
MSYS2/Cygwin and see if the slowdown is acceptable for you.
You can turn it on or off without re-sourcing any files, so if it's
particularly slow in a large repository you can just do:
unset SPS_STATUS
, to turn it off.
It may be particularly slow when entering a repository, but after that it will
be cached and the prompt will be much faster.
SPS_ESCAPE
The prompt tries to detect bash/busybox/(d)ash/ksh and use zero-width escape
sequences if found. If your shell does not support the \[ ... \] zero-width
escape sequences, for example because you didn't turn on the fancy prompt
feature in busybox, you can turn them off by setting:
SPS_ESCAPE=0
, or force them on with:
SPS_ESCAPE=1
. If you have a wide enough window, the prompt will work more or less ok without
the escape sequences in shells that don't support them.
SPS_WINDOW_TITLE
By default the window title is set to the domain of the host or the hostname if
on a local network (only two full hostname parts, such as machine.localnet.)
To turn this off set:
SPS_WINDOW_TITLE=0
. This is a work in progress and I plan to expand this feature to allow for
complex window titles using formats and evaluated variables/commands.
About
Simple, fast, nice looking and colorful prompt for busybox/(d)ash/ksh/bash/zsh with Git branch, optional Git status indicator and exit status. Much faster than other Git prompts on MSYS2/Cygwin/WSL.