mirror of
https://gitee.com/mirrors/ohmyzsh.git
synced 2026-10-16 18:06:45 +08:00
Move current_branch() from git plugin to core lib/git.zsh
Fixes #4085: core -> plugin dependency issue. Rename it to git_current_branch for clarity that it's git-specific. Update all plugins that were calling it to use new name. Fix variable leaks by making more variables in lib/git.zsh local. Have lib/git.zsh use [[ ]] instead of [ ] everywhere.
This commit is contained in:
1 parent
bfd2d8de24
commit
9f552130bd
9 files changed
+64
-61
No files matched your search
@@ -28,7 +28,7 @@ git_dirty() {
|
||||
}
|
||||
|
||||
git_prompt() {
|
||||
local cb=$(current_branch)
|
||||
local cb=$(git_current_branch)
|
||||
if [ -n "$cb" ]; then
|
||||
local repo_path=$(git_repo_path)
|
||||
echo " %{$fg_bold[grey]%}$cb %{$fg[white]%}$(git_commit_id)%{$reset_color%}$(git_mode)$(git_dirty)"
|
||||
|
||||
Reference in new issue
Block a user