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
51677da8
Commit
51677da8
authored
Sep 19, 2015
by
Robby Russell
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4091 from apjanke/agnoster-clarify-powerline
agnoster: Use current Powerline chars everywhere, and clarify behavior
parents
36884cca
c82deedc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
7 deletions
+25
-7
agnoster.zsh-theme
themes/agnoster.zsh-theme
+25
-7
No files found.
themes/agnoster.zsh-theme
View file @
51677da8
...
...
@@ -7,6 +7,9 @@
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
# Make sure you have a recent version: the code points that Powerline
# uses changed in 2012, and older versions will display incorrectly,
# in confusing ways.
#
# In addition, I recommend the
# [Solarized theme](https://github.com/altercation/solarized/) and, if you're
...
...
@@ -27,12 +30,21 @@
CURRENT_BG
=
'NONE'
# Fix odd char on mac
if
[[
`
uname
`
==
'Darwin'
]]
;
then
SEGMENT_SEPARATOR
=
'\ue0b0'
else
SEGMENT_SEPARATOR
=
''
fi
# Special Powerline characters
()
{
local
LC_ALL
=
""
LC_CTYPE
=
"en_US.UTF-8"
# NOTE: This segment separator character is correct. In 2012, Powerline changed
# the code points they use for their special characters. This is the new code point.
# If this is not working for you, you probably have an old version of the
# Powerline-patched fonts installed. Download and install the new version.
# Do not submit PRs to change this unless you have reviewed the Powerline code point
# history and have new information.
# This is defined using a Unicode escape sequence so it is unambiguously readable, regardless of
# what font the user is viewing this source code in. Do not replace the
# escape sequence with a single literal character.
SEGMENT_SEPARATOR
=
$'
\u
e0b0'
#
}
# Begin a segment
# Takes two arguments, background and foreground. Both can be omitted,
...
...
@@ -73,6 +85,12 @@ prompt_context() {
# Git: branch/detached head, dirty status
prompt_git
()
{
local
PL_BRANCH_CHAR
()
{
local
LC_ALL
=
""
LC_CTYPE
=
"en_US.UTF-8"
PL_BRANCH_CHAR
=
$'
\u
e0a0'
#
}
local
ref dirty mode repo_path
repo_path
=
$(
git rev-parse
--git-dir
2>/dev/null
)
...
...
@@ -104,7 +122,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_
%%
}${
mode
}
"
echo
-n
"
${
ref
/refs\/heads\//
$PL_BRANCH_CHAR
}${
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