|
|
@ -423,17 +423,29 @@ build_right_prompt() {
|
|
|
|
done
|
|
|
|
done
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
precmd() {
|
|
|
|
prompt_powerlevel9k_precmd() {
|
|
|
|
vcs_info
|
|
|
|
vcs_info
|
|
|
|
|
|
|
|
|
|
|
|
# Add a static hook to examine staged/unstaged changes.
|
|
|
|
# Add a static hook to examine staged/unstaged changes.
|
|
|
|
vcs_info_hookadd set-message vcs-detect-changes
|
|
|
|
vcs_info_hookadd set-message vcs-detect-changes
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if [[ "$POWERLEVEL9K_PROMPT_ON_NEWLINE" == true ]]; then
|
|
|
|
powerlevel9k_init() {
|
|
|
|
PROMPT='╭─%{%f%b%k%}$(build_left_prompt)
|
|
|
|
setopt LOCAL_OPTIONS
|
|
|
|
╰─ '
|
|
|
|
unsetopt XTRACE KSH_ARRAYS
|
|
|
|
else
|
|
|
|
prompt_opts=(cr percent subst)
|
|
|
|
PROMPT='%{%f%b%k%}$(build_left_prompt) '
|
|
|
|
|
|
|
|
fi
|
|
|
|
autoload -Uz add-zsh-hook
|
|
|
|
RPROMPT='%{%f%b%k%}$(build_right_prompt)%{$reset_color%}'
|
|
|
|
|
|
|
|
|
|
|
|
add-zsh-hook precmd prompt_powerlevel9k_precmd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [[ "$POWERLEVEL9K_PROMPT_ON_NEWLINE" == true ]]; then
|
|
|
|
|
|
|
|
PROMPT="╭─%{%f%b%k%}"'$(build_left_prompt)'"
|
|
|
|
|
|
|
|
╰─ "
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
PROMPT="%{%f%b%k%}"'$(build_left_prompt)'" "
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
RPROMPT="%{%f%b%k%}"'$(build_right_prompt)'"%{$reset_color%}"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
powerlevel9k_init "$@"
|
|
|
|