zsh: if we're gonna export this then we might as well do the right thing
This commit is contained in:
parent
5fae6d1063
commit
3eeb6d8d87
|
@ -10,5 +10,5 @@ function fetch_fronter_color {
|
|||
# fetch the fronter color every precmd and export it for the prompt
|
||||
precmd_functions+="set_fronter_color"
|
||||
function set_fronter_color {
|
||||
export fronter_color="$(eval_with_secrets fetch_fronter_color)"
|
||||
export PK_FRONTER_COLOR="$(eval_with_secrets fetch_fronter_color)"
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ autoload -Uz vcs_info
|
|||
precmd_functions+="vcs_info"
|
||||
|
||||
# Prompt shows hostname if connected to a remote or if root
|
||||
PROMPT="%B$([ -n "$is_remote" ] || [ "$EUID" = 0 ] && echo "%F{magenta}%m%f ")%F{$([ "$EUID" = 0 ] && echo "red" || echo "\${fronter_color:-cyan}")}%n%f %F{blue}%~%f%b \${vcs_info_msg_0_}%B%#%b "
|
||||
PROMPT="%B$([ -n "$is_remote" ] || [ "$EUID" = 0 ] && echo "%F{magenta}%m%f ")%F{$([ "$EUID" = 0 ] && echo "red" || echo "\${PK_FRONTER_COLOR:-cyan}")}%n%f %F{blue}%~%f%b \${vcs_info_msg_0_}%B%#%b "
|
||||
|
||||
# The line before the prompt is used by RPROMPT for information about the previous command - leave space
|
||||
NEWLINE=$'\n'
|
||||
|
|
Loading…
Reference in a new issue