mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-06-05 05:03:16 +02:00
Merge remote-tracking branch 'upstream/master'
Conflicts: lib/git.zsh
This commit is contained in:
commit
6000880f2d
38 changed files with 844 additions and 144 deletions
|
|
@ -43,7 +43,8 @@ CURRENT_BG='NONE'
|
|||
# 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=$'\ue0b0' #
|
||||
# Do not change this! Do not make it '\u2b80'; that is the old, wrong code point.
|
||||
SEGMENT_SEPARATOR=$'\ue0b0'
|
||||
}
|
||||
|
||||
# Begin a segment
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@ ZSH_THEME_GIT_PROMPT_CLEAN=""
|
|||
|
||||
# Customized git status, oh-my-zsh currently does not allow render dirty status before branch
|
||||
git_custom_status() {
|
||||
local cb=$(current_branch)
|
||||
local cb=$(git_current_branch)
|
||||
if [ -n "$cb" ]; then
|
||||
echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||
echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(git_current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ PROMPT='
|
|||
%{$fg_bold[gray]%}%~%{$fg_bold[blue]%}%{$fg_bold[blue]%} % %{$reset_color%}
|
||||
%{$fg[green]%}➞ %{$reset_color%'
|
||||
|
||||
RPROMPT='$(git_prompt_info) $(rvm)'
|
||||
RPROMPT='$(git_prompt_info) ${rvm}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}[git:"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# Depends on the git plugin for work_in_progress()
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}["
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}"
|
||||
|
|
@ -5,9 +7,9 @@ ZSH_THEME_GIT_PROMPT_CLEAN=""
|
|||
|
||||
#Customized git status, oh-my-zsh currently does not allow render dirty status before branch
|
||||
git_custom_status() {
|
||||
local cb=$(current_branch)
|
||||
local cb=$(git_current_branch)
|
||||
if [ -n "$cb" ]; then
|
||||
echo "$(parse_git_dirty)%{$fg_bold[yellow]%}$(work_in_progress)%{$reset_color%}$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||
echo "$(parse_git_dirty)%{$fg_bold[yellow]%}$(work_in_progress)%{$reset_color%}$ZSH_THEME_GIT_PROMPT_PREFIX$(git_current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ function josh_prompt {
|
|||
(( spare_width = ${COLUMNS} ))
|
||||
prompt=" "
|
||||
|
||||
branch=$(current_branch)
|
||||
branch=$(git_current_branch)
|
||||
ruby_version=$(rvm_prompt_info || rbenv_prompt_info)
|
||||
path_size=${#PWD}
|
||||
branch_size=${#branch}
|
||||
|
|
@ -31,7 +31,7 @@ function josh_prompt {
|
|||
prompt=" $prompt"
|
||||
done
|
||||
|
||||
prompt="%{%F{green}%}$PWD$prompt%{%F{red}%}$(rvm_prompt_info || rbenv_prompt_info)%{$reset_color%} $(current_branch)"
|
||||
prompt="%{%F{green}%}$PWD$prompt%{%F{red}%}$(rvm_prompt_info || rbenv_prompt_info)%{$reset_color%} $(git_current_branch)"
|
||||
|
||||
echo $prompt
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
# Needs Git plugin for current_branch method
|
||||
|
||||
# Color shortcuts
|
||||
RED=$fg[red]
|
||||
YELLOW=$fg[yellow]
|
||||
|
|
@ -40,4 +38,4 @@ ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$WHITE%}]"
|
|||
PROMPT='
|
||||
%{$GREEN_BOLD%}%n@%m%{$WHITE%}:%{$YELLOW%}%~%u$(parse_git_dirty)$(git_prompt_ahead)%{$RESET_COLOR%}
|
||||
%{$BLUE%}>%{$RESET_COLOR%} '
|
||||
RPROMPT='%{$GREEN_BOLD%}$(current_branch)$(git_prompt_short_sha)$(git_prompt_status)%{$RESET_COLOR%}'
|
||||
RPROMPT='%{$GREEN_BOLD%}$(git_current_branch)$(git_prompt_short_sha)$(git_prompt_status)%{$RESET_COLOR%}'
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ function my_git_prompt() {
|
|||
STATUS=""
|
||||
|
||||
# is branch ahead?
|
||||
if $(echo "$(git log origin/$(current_branch)..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
|
||||
if $(echo "$(git log origin/$(git_current_branch)..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
|
||||
STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_AHEAD"
|
||||
fi
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ function my_git_prompt() {
|
|||
}
|
||||
|
||||
function my_current_branch() {
|
||||
echo $(current_branch || echo "(no branch)")
|
||||
echo $(git_current_branch || echo "(no branch)")
|
||||
}
|
||||
|
||||
function ssh_connection() {
|
||||
|
|
|
|||
|
|
@ -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)"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
# Sunrise theme for oh-my-zsh
|
||||
# Intended to be used with Solarized: http://ethanschoonover.com/solarized
|
||||
# (Needs Git plugin for current_branch method)
|
||||
|
||||
# Color shortcuts
|
||||
R=$fg_no_bold[red]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue