mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-13 03:01:32 +01:00
Added a function to retrieve the current git branch. Allows git prompt info when using ZSH+oh-my-zsh through Cygwin.
This commit is contained in:
parent
ec37c05cb3
commit
00688ac163
1 changed files with 8 additions and 0 deletions
|
|
@ -7,6 +7,14 @@ function git_prompt_info() {
|
|||
fi
|
||||
}
|
||||
|
||||
git_prompt_info_quick() {
|
||||
ref=$(git symbolic-ref HEAD) 2> /dev/null
|
||||
if [ "${ref}" != "" ]
|
||||
then
|
||||
echo "git:${ref#refs/heads/}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# Checks if working tree is dirty
|
||||
parse_git_dirty() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue