Releases: agkozak/agkozak-zsh-prompt
AGKOZAK_USER_HOST_DISPLAY
Setting AGKOZAK_USER_HOST_DISPLAY
to 0
causes the username and hostname not to be displayed.
Less unnecessary disk activity when running git status
When the local git
version is 2.15.0 or greater, git status
will not run unnecessary optional operations that require locks.
Bug fix for ZSH v5.0.2
- The
subst-async
method now works correctly on ZSH v5.0.2, but - The
usr1
method will be the default on ZSH v5.0.2, as it should be slightly faster thansubst-async
Introducing $AGKOZAK_BRANCH_STATUS_SEPARATOR
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='--'
).
Custom prompt characters, prompt character colors, and Git symbols
- The array
AGKOZAK_PROMPT_CHAR
allows the user to specify prompt characters for regular user, superuser, andvi
command mode. - Setting
AGKOZAK_COLORS_PROMPT_CHAR
can change the color of the prompt character. - The array
AGKOZAK_CUSTOM_SYMBOLS
contains user-specified symbols for displaying the Git status.
Minor improvements
- Removes use of external command
cat
inusr1
async method - Uses latest commit of
zsh-async
that avoids infinite loops due to corrupted file descriptors
Restored _agkozak_vi_mode_indicator for legacy custom prompts
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.
v3.0.0: Async via process substitution, left-promp-only mode, and general speed improvements
New in this release:
- The asynchronous Git status is now available via process substitution in all supported versions of ZSH and on all supported systems (props to @psprint). For reasons of speed,
zsh-async
remains the default asynchronous method in WSL and Solaris, andusr1
is default in MSYS2/Cygwin. - AGKOZAK_LEFT_PROMPT_ONLY - when set to
1
, the Git status is displayed in the left prompt, and the right prompt is blank.
Improvements:
- The prompt script loads up to 4x faster.
- The left prompt displays ~2x faster.
Bug fixes and improvements
- The prompt uses
termcap
sequences only with FreeBSD and DragonFly BSD;terminfo
with other BSDs - No ugly escape sequences on DragonFly BSD's
cons25
console - If
$HOME
happens to be/
(as is the case forroot
on Solaris 10), the path will be displayed correctly when AGKOZAK_NAMED_DIRS=0 - One subshell eliminated when remote/local status is being calculated
Speed improvements
By 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).