[zsh] added back accidentally deleted function
+ cleaned up left prompt and rprompt
This commit is contained in:
@@ -23,6 +23,12 @@ unpushed() {
|
|||||||
/usr/bin/git cherry -v @{upstream} 2>/dev/null
|
/usr/bin/git cherry -v @{upstream} 2>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
git_prompt_info() {
|
||||||
|
ref=$(/usr/bin/git symbolic-ref HEAD 2>/dev/null) || return
|
||||||
|
# echo "(%{\e[0;33m%}${ref#refs/heads/}%{\e[0m%})"
|
||||||
|
echo "${ref#refs/heads/}"
|
||||||
|
}
|
||||||
|
|
||||||
need_push() {
|
need_push() {
|
||||||
if [[ $(unpushed) == "" ]]
|
if [[ $(unpushed) == "" ]]
|
||||||
then
|
then
|
||||||
@@ -36,5 +42,5 @@ directory_name(){
|
|||||||
echo "%{$fg_bold[cyan]%}%1/%\/%{$reset_color%}"
|
echo "%{$fg_bold[cyan]%}%1/%\/%{$reset_color%}"
|
||||||
}
|
}
|
||||||
|
|
||||||
export PROMPT=$'in $(directory_name) $(git_dirty)$(need_push)\n➜ '
|
export PROMPT=$'$(directory_name) %{$fg_bold[cyan]%}➜%{$reset_color%} '
|
||||||
export RPROMPT=$'$(git_dirty)$(need_push)'
|
export RPROMPT=$'$(git_dirty)$(need_push)'
|
||||||
|
|||||||
Reference in New Issue
Block a user