這裏是我的ZSH提示主題ZSH RPROMPT奇怪的空間?
function git_prompt_info() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
}
PROMPT='$fg[yellow]%}⚡︎ $fg[cyan]%~ $(git_prompt_info)
%{$reset_color%}→ '
ZSH_THEME_GIT_PROMPT_PREFIX="[git:"
ZSH_THEME_GIT_PROMPT_SUFFIX="]$reset_color"
ZSH_THEME_GIT_PROMPT_DIRTY="$fg[red]+"
ZSH_THEME_GIT_PROMPT_CLEAN="$fg[green]"
RPROMPT='%T'
它看起來像這樣
當我移動$(git_prompt_info)到RPROMPT
function git_prompt_info() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
}
PROMPT='%T $fg[yellow]%}⚡︎ $fg[cyan]%~
%{$reset_color%}→ '
ZSH_THEME_GIT_PROMPT_PREFIX="[git:"
ZSH_THEME_GIT_PROMPT_SUFFIX="]$reset_color"
ZSH_THEME_GIT_PROMPT_DIRTY="$fg[red]+"
ZSH_THEME_GIT_PROMPT_CLEAN="$fg[green]"
RPROMPT='$(git_prompt_info)'
它看起來像這樣
看到右邊的間距?另外箭頭從錯誤的地方開始?
我該如何解決這個問題?
感謝
嘿,請你分享的配色方案?我知道這個線程是舊的,但也許你還行嗎=/ – roboslone