mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-06 02:51:32 +01:00
fix(trapd00r.zsh): prompt to bottom
This commit is contained in:
parent
3568f669fc
commit
11684d6cf5
1 changed files with 16 additions and 15 deletions
|
|
@ -108,25 +108,26 @@ add-zsh-hook precmd prompt_jnrowe_precmd
|
||||||
|
|
||||||
prompt_jnrowe_precmd () {
|
prompt_jnrowe_precmd () {
|
||||||
vcs_info
|
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='${dir_status} ${ret_status}%{$reset_color%}
|
if [ "${vcs_info_msg_0_}" = "" ]; then
|
||||||
|
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})"
|
||||||
|
PROMPT='${dir_status} ${ret_status}%{$reset_color%}
|
||||||
> '
|
> '
|
||||||
# modified, to be committed
|
# modified, to be committed
|
||||||
elif [[ $(git diff --cached --name-status 2>/dev/null ) != "" ]]; then
|
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%})"
|
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%}
|
PROMPT='${vcs_info_msg_0_}%{$30%} %{$bg_bold[red]%}%{$fg_bold[cyan]%}C%{$fg_bold[black]%}OMMIT%{$reset_color%}
|
||||||
${dir_status}%{$reset_color%}
|
${dir_status}%{$reset_color%}
|
||||||
> '
|
> '
|
||||||
elif [[ $(git diff --name-status 2>/dev/null ) != "" ]]; then
|
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%})"
|
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%}
|
PROMPT='${vcs_info_msg_0_}%{$bg_bold[red]%}%{$fg_bold[blue]%}D%{$fg_bold[black]%}IRTY%{$reset_color%}
|
||||||
${dir_status}%{$reset_color%}
|
${dir_status}%{$reset_color%}
|
||||||
%{$c13%}>%{$c0%} '
|
%{$c13%}>%{$c0%} '
|
||||||
else
|
else
|
||||||
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})"
|
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})"
|
||||||
PROMPT='${vcs_info_msg_0_}
|
PROMPT='${vcs_info_msg_0_}
|
||||||
${dir_status}%{$reset_color%}
|
${dir_status}%{$reset_color%}
|
||||||
> '
|
> '
|
||||||
fi
|
fi
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue