Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
533e31f2
Commit
533e31f2
authored
Dec 02, 2013
by
Robby Russell
Browse files
Merge pull request #1956 from emesix/patch-1
Update jonathan.zsh-theme
parents
3ff772d6
2defe0b5
Changes
1
Show whitespace changes
Inline
Side-by-side
themes/jonathan.zsh-theme
View file @
533e31f2
...
@@ -71,17 +71,30 @@ setprompt () {
...
@@ -71,17 +71,30 @@ setprompt () {
###
###
# See if we can use extended characters to look nicer.
# See if we can use extended characters to look nicer.
# UTF-8 Fixed
if [[ $(locale charmap) == "UTF-8" ]]; then
PR_SET_CHARSET=""
PR_SHIFT_IN=""
PR_SHIFT_OUT=""
PR_HBAR="─"
PR_ULCORNER="┌"
PR_LLCORNER="└"
PR_LRCORNER="┘"
PR_URCORNER="┐"
else
typeset -A altchar
typeset -A altchar
set -A altchar ${(s..)terminfo[acsc]}
set -A altchar ${(s..)terminfo[acsc]}
# Some stuff to help us draw nice lines
PR_SET_CHARSET="%{$terminfo[enacs]%}"
PR_SET_CHARSET="%{$terminfo[enacs]%}"
PR_SHIFT_IN="%{$terminfo[smacs]%}"
PR_SHIFT_IN="%{$terminfo[smacs]%}"
PR_SHIFT_OUT="%{$terminfo[rmacs]%}"
PR_SHIFT_OUT="%{$terminfo[rmacs]%}"
PR_HBAR=${altchar[q]:--}
PR_HBAR='$PR_SHIFT_IN${altchar[q]:--}$PR_SHIFT_OUT'
PR_ULCORNER=${altchar[l]:--}
PR_ULCORNER='$PR_SHIFT_IN${altchar[l]:--}$PR_SHIFT_OUT'
PR_LLCORNER=${altchar[m]:--}
PR_LLCORNER='$PR_SHIFT_IN${altchar[m]:--}$PR_SHIFT_OUT'
PR_LRCORNER=${altchar[j]:--}
PR_LRCORNER='$PR_SHIFT_IN${altchar[j]:--}$PR_SHIFT_OUT'
PR_URCORNER=${altchar[k]:--}
PR_URCORNER='$PR_SHIFT_IN${altchar[k]:--}$PR_SHIFT_OUT'
fi
###
###
...
@@ -113,27 +126,27 @@ setprompt () {
...
@@ -113,27 +126,27 @@ setprompt () {
# Finally, the prompt.
# Finally, the prompt.
PROMPT='$PR_SET_CHARSET$PR_STITLE${(e)PR_TITLEBAR}\
PROMPT='$PR_SET_CHARSET$PR_STITLE${(e)PR_TITLEBAR}\
$PR_CYAN$PR_
SHIFT_IN$PR_
ULCORNER$PR_HBAR$PR_
SHIFT_OUT$PR_
GREY(\
$PR_CYAN$PR_ULCORNER$PR_HBAR$PR_GREY(\
$PR_GREEN%$PR_PWDLEN<...<%~%<<\
$PR_GREEN%$PR_PWDLEN<...<%~%<<\
$PR_GREY)`rvm_prompt_info || rbenv_prompt_info`$PR_CYAN$PR_
SHIFT_IN$PR_
HBAR$PR_HBAR${(e)PR_FILLBAR}$PR_HBAR$PR_
SHIFT_OUT$PR_
GREY(\
$PR_GREY)`rvm_prompt_info || rbenv_prompt_info`$PR_CYAN$PR_HBAR$PR_HBAR${(e)PR_FILLBAR}$PR_HBAR$PR_GREY(\
$PR_CYAN%(!.%SROOT%s.%n)$PR_GREY@$PR_GREEN%m:%l\
$PR_CYAN%(!.%SROOT%s.%n)$PR_GREY@$PR_GREEN%m:%l\
$PR_GREY)$PR_CYAN$PR_
SHIFT_IN$PR_
HBAR$PR_URCORNER
$PR_SHIFT_OUT
\
$PR_GREY)$PR_CYAN$PR_HBAR$PR_URCORNER\
$PR_CYAN$PR_
SHIFT_IN$PR_
LLCORNER$PR_BLUE$PR_HBAR
$PR_SHIFT_OUT
(\
$PR_CYAN$PR_LLCORNER$PR_BLUE$PR_HBAR(\
$PR_YELLOW%D{%H:%M:%S}\
$PR_YELLOW%D{%H:%M:%S}\
$PR_LIGHT_BLUE%{$reset_color%}`git_prompt_info``git_prompt_status`$PR_BLUE)$PR_CYAN$PR_
SHIFT_IN$PR_
HBAR\
$PR_LIGHT_BLUE%{$reset_color%}`git_prompt_info``git_prompt_status`$PR_BLUE)$PR_CYAN$PR_HBAR\
$PR_
SHIFT_IN$PR_HBAR$PR_SHIFT_OUT
\
$PR_
HBAR
\
>$PR_NO_COLOUR '
>$PR_NO_COLOUR '
# display exitcode on the right when >0
# display exitcode on the right when >0
return_code="%(?..%{$fg[red]%}%? ↵ %{$reset_color%})"
return_code="%(?..%{$fg[red]%}%? ↵ %{$reset_color%})"
RPROMPT=' $return_code$PR_CYAN$PR_
SHIFT_IN$PR_
HBAR$PR_BLUE$PR_HBAR
$PR_SHIFT_OUT
\
RPROMPT=' $return_code$PR_CYAN$PR_HBAR$PR_BLUE$PR_HBAR\
($PR_YELLOW%D{%a,%b%d}$PR_BLUE)$PR_
SHIFT_IN$PR_
HBAR$PR_CYAN$PR_LRCORNER$PR_
SHIFT_OUT$PR_
NO_COLOUR'
($PR_YELLOW%D{%a,%b%d}$PR_BLUE)$PR_HBAR$PR_CYAN$PR_LRCORNER$PR_NO_COLOUR'
PS2='$PR_CYAN$PR_
SHIFT_IN$PR_HBAR$PR_SHIFT_OUT
\
PS2='$PR_CYAN$PR_
HBAR
\
$PR_BLUE$PR_
SHIFT_IN$PR_HBAR$PR_SHIFT_OUT
(\
$PR_BLUE$PR_
HBAR
(\
$PR_LIGHT_GREEN%_$PR_BLUE)$PR_
SHIFT_IN$PR_HBAR$PR_SHIFT_OUT
\
$PR_LIGHT_GREEN%_$PR_BLUE)$PR_
HBAR
\
$PR_CYAN$PR_
SHIFT_IN$PR_HBAR$PR_SHIFT_OUT
$PR_NO_COLOUR '
$PR_CYAN$PR_
HBAR
$PR_NO_COLOUR '
}
}
setprompt
setprompt
...
...
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