A fast, asynchronous Zsh prompt with color ASCII indicators of Git, exit, SSH, virtual environment, and vi mode status. Framework-agnostic and customizable.
When the local git
version is 2.15.0 or greater, git status
will not run unnecessary optional operations that require locks.
subst-async
method now works correctly on ZSH v5.0.2, butusr1
method will be the default on ZSH v5.0.2, as it should be slightly faster than subst-async
By default, a space precedes the Git branch status indicator. The space can now be eliminated by setting AGKOZAK_BRANCH_STATUS_SEPARATOR=''
, or changed to another character or characters (e.g. AGKOZAK_BRANCH_STATUS_SEPARATOR='--'
).
AGKOZAK_PROMPT_CHAR
allows the user to specify prompt characters for regular user, superuser, and vi
command mode.AGKOZAK_COLORS_PROMPT_CHAR
can change the color of the prompt character.AGKOZAK_CUSTOM_SYMBOLS
contains user-specified symbols for displaying the Git status.cat
in usr1
async methodzsh-async
that avoids infinite loops due to corrupted file descriptors
I have restored the _agkozak_vi_mode_indicator
function as a legacy feature, as many people people use it in custom prompts. The default indicator can be expressed as '%(4V.:.%#)'
, though, and variations on this will be preferable to '$(_agkozak_vi_mode_indicator)'
, which entails a subshell.
New in this release:
zsh-async
remains the default asynchronous method in WSL and Solaris, and usr1
is default in MSYS2/Cygwin.1
, the Git status is displayed in the left prompt, and the right prompt is blank.Improvements:
termcap
sequences only with FreeBSD and DragonFly BSD; terminfo
with other BSDscons25
console$HOME
happens to be /
(as is the case for root
on Solaris 10), the path will be displayed correctly when AGKOZAK_NAMED_DIRS=0By making intelligent assumptions about TERM and OSTYPE, the prompt can frequently avoid running two external commands in subshells as it starts up. The difference is noticeable on Windows (MSY2/Cygwin/WSL).