mirror of https://github.com/bjeanes/dotfiles.git
Prompt is blue if connected through SSH
parent
58769a6faa
commit
91cf3ef846
|
@ -2,7 +2,11 @@ function prompt_color() {
|
|||
if [ "$USER" = "root" ]; then
|
||||
echo "red"
|
||||
else
|
||||
echo "green"
|
||||
if [ -n "$SSH_TTY" ]; then
|
||||
echo "blue"
|
||||
else
|
||||
echo "green"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -12,4 +16,4 @@ ZSH_THEME_VCS_PROMPT_SUFFIX="›%{$reset_color%}"
|
|||
ZSH_THEME_VCS_PROMPT_FORMAT="${ZSH_THEME_VCS_PROMPT_PREFIX}%b:%h${ZSH_THEME_VCS_PROMPT_SUFFIX}"
|
||||
|
||||
PS1='%{$fg[blue]%}$(prompt_pwd)%{$reset_color%} %{$fg[$(prompt_color)]%}♪%{$reset_color%} '
|
||||
RPS1='$(${VCPROMPT} -f ${ZSH_THEME_VCS_PROMPT_FORMAT})'
|
||||
RPS1='$(${VCPROMPT} -f ${ZSH_THEME_VCS_PROMPT_FORMAT})'
|
||||
|
|
Loading…
Reference in New Issue