mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
parent
f6bc949c05
commit
69a380771e
12 changed files with 18 additions and 44 deletions
|
|
@ -109,23 +109,23 @@ prompt_jnrowe_precmd () {
|
|||
vcs_info
|
||||
if [ "${vcs_info_msg_0_}" = "" ]; then
|
||||
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})"
|
||||
PROMPT='%{$fg_bold[green]%}%p%{$reset_color%}${vcs_info_msg_0_}${dir_status} ${ret_status}%{$reset_color%}
|
||||
PROMPT='${dir_status} ${ret_status}%{$reset_color%}
|
||||
> '
|
||||
# modified, to be committed
|
||||
elif [[ $(git diff --cached --name-status 2>/dev/null ) != "" ]]; then
|
||||
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})"
|
||||
PROMPT='${vcs_info_msg_0_}%{$30%} %{$bg_bold[red]%}%{$fg_bold[cyan]%}C%{$fg_bold[black]%}OMMIT%{$reset_color%}
|
||||
%{$fg_bold[green]%}%p%{$reset_color%}${dir_status}%{$reset_color%}
|
||||
${dir_status}%{$reset_color%}
|
||||
> '
|
||||
elif [[ $(git diff --name-status 2>/dev/null ) != "" ]]; then
|
||||
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})"
|
||||
PROMPT='${vcs_info_msg_0_}%{$bg_bold[red]%}%{$fg_bold[blue]%}D%{$fg_bold[black]%}IRTY%{$reset_color%}
|
||||
%{$fg_bold[green]%}%p%{$reset_color%}${dir_status}%{$reset_color%}
|
||||
${dir_status}%{$reset_color%}
|
||||
%{$c13%}>%{$c0%} '
|
||||
else
|
||||
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})"
|
||||
PROMPT='${vcs_info_msg_0_}
|
||||
%{$fg_bold[green]%}%p%{$reset_color%}${dir_status}%{$reset_color%}
|
||||
${dir_status}%{$reset_color%}
|
||||
> '
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue