Plugin creates a global variable with git
status information that can be displayed in prompts.
PROMPT='$pr_git ...REST OF PROMPT'
This plugin made to be fast. It runs in background and update information only if need.
Please, compile git-status.cpp
from zsh-git-cal-status-cpp, and put in $PATH
as git-status
.
git clone https://gitlab.com/cosurgi/zsh-git-cal-status-cpp
cd zsh-git-cal-status-cpp
g++ -Ofast git-status.cpp -o git-status -std=c++14 -Wall -Wextra -Wpedantic -Wshadow -Wenum-compare -Wunreachable-code -Werror=narrowing -Werror=return-type -lboost_program_options -static
cp git-status ~/.bin # Or copy to another dir from $PATH
This plugin depends on zsh-colors.
If you don't use zpm, install it manually and activate it before this plugin. If you use zpm you don’t need to do anything
If you use oh-my-zsh
- Clone this repository into
~/.oh-my-zsh/custom/plugins
cd ~/.oh-my-zsh/custom/plugins
git clone https://github.com/zpm-zsh/pr-git
- After that, add
pr-git
to your oh-my-zsh plugins array.
If you use Zgen
- Add
zgen load zpm-zsh/pr-git
to your.zshrc
with your other plugin - run
zgen save
If you use my ZPM
- Add
zpm load zpm-zsh/pr-git
into your.zshrc