Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
53323abd
Commit
53323abd
authored
Mar 20, 2014
by
tcasparro
Committed by
redsunsoft
Mar 26, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added git mode support for merging, rebasing, and bisecting
<B> Designates Bisecting >M< Designates Merging >R> Designates Rebasing
parent
ffc17b6b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
agnoster.zsh-theme
themes/agnoster.zsh-theme
+12
-2
No files found.
themes/agnoster.zsh-theme
View file @
53323abd
...
...
@@ -69,7 +69,9 @@ prompt_context() {
# Git: branch/detached head, dirty status
prompt_git
()
{
local
ref dirty
local
ref dirty mode repo_path
repo_path
=
$(
git rev-parse
--git-dir
2>/dev/null
)
if
$(
git rev-parse
--is-inside-work-tree
>
/dev/null 2>&1
)
;
then
dirty
=
$(
parse_git_dirty
)
ref
=
$(
git symbolic-ref HEAD 2> /dev/null
)
||
ref
=
"➦
$(
git show-ref
--head
-s
--abbrev
|head
-n1
2> /dev/null
)
"
...
...
@@ -79,6 +81,14 @@ prompt_git() {
prompt_segment green black
fi
if
[[
-e
"
${
repo_path
}
/BISECT_LOG"
]]
;
then
mode
=
" <B>"
elif
[[
-e
"
${
repo_path
}
/MERGE_HEAD"
]]
;
then
mode
=
" >M<"
elif
[[
-e
"
${
repo_path
}
/rebase"
||
-e
"
${
repo_path
}
/rebase-apply"
||
-e
"
${
repo_path
}
/rebase-merge"
||
-e
"
${
repo_path
}
/../.dotest"
]]
;
then
mode
=
" >R>"
fi
setopt promptsubst
autoload
-Uz
vcs_info
...
...
@@ -90,7 +100,7 @@ prompt_git() {
zstyle
':vcs_info:*'
formats
' %u%c'
zstyle
':vcs_info:*'
actionformats
' %u%c'
vcs_info
echo
-n
"
${
ref
/refs\/heads\//
}${
vcs_info_msg_0_
%%
}
"
echo
-n
"
${
ref
/refs\/heads\//
}${
vcs_info_msg_0_
%%
}
${
mode
}
"
fi
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment