mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-06 02:51:32 +01:00
fix(linuxonly): prompt to bottom
This commit is contained in:
parent
6c021fd432
commit
f0590e6597
1 changed files with 14 additions and 14 deletions
|
|
@ -34,25 +34,25 @@ add-zsh-hook precmd prompt_jnrowe_precmd
|
||||||
|
|
||||||
prompt_jnrowe_precmd () {
|
prompt_jnrowe_precmd () {
|
||||||
vcs_info
|
vcs_info
|
||||||
|
}
|
||||||
|
|
||||||
if [ "${vcs_info_msg_0_}" = "" ]; then
|
if [ "${vcs_info_msg_0_}" = "" ]; then
|
||||||
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})"
|
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})"
|
||||||
PROMPT='${dir_status} ${ret_status}%{$reset_color%}
|
PROMPT='${dir_status} ${ret_status}%{$reset_color%}
|
||||||
> '
|
> '
|
||||||
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%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})"
|
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})"
|
||||||
PROMPT='${vcs_info_msg_0_}
|
PROMPT='${vcs_info_msg_0_}
|
||||||
${dir_status} ${vcs_info_msg_0_}%{$reset_color%}
|
${dir_status} ${vcs_info_msg_0_}%{$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%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})"
|
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})"
|
||||||
PROMPT='${vcs_info_msg_0_}
|
PROMPT='${vcs_info_msg_0_}
|
||||||
${dir_status}%{$reset_color%}
|
${dir_status}%{$reset_color%}
|
||||||
%{$c9%}·>%{$c0%} '
|
%{$c9%}·>%{$c0%} '
|
||||||
else
|
else
|
||||||
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})"
|
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})"
|
||||||
PROMPT='${vcs_info_msg_0_}
|
PROMPT='${vcs_info_msg_0_}
|
||||||
${dir_status} ${vcs_info_msg_0_}%{$reset_color%}
|
${dir_status} ${vcs_info_msg_0_}%{$reset_color%}
|
||||||
> '
|
> '
|
||||||
fi
|
fi
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue