1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-25 23:30:08 +00:00

Red prompt for remote hosts

This commit is contained in:
James Smith 2012-09-20 19:35:09 -07:00
parent 6c13721f55
commit 00bff0a996

View file

@ -3,10 +3,16 @@
local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}" local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}"
local host_color="green"
if [ -n "$SSH_CLIENT" ]; then
local host_color="red"
fi
PROMPT=' PROMPT='
%{$fg_bold[grey]%}[%{$reset_color%}%{$fg_bold[green]%}%n@%m%{$reset_color%}%{$fg_bold[grey]%}]%{$reset_color%} %{$fg_bold[blue]%}%10c%{$reset_color%} $(git_prompt_info) $(git_remote_status) %{$fg_bold[grey]%}[%{$reset_color%}%{$fg_bold[${host_color}]%}%n@%m%{$reset_color%}%{$fg_bold[grey]%}]%{$reset_color%} %{$fg_bold[blue]%}%10c%{$reset_color%} $(git_prompt_info) $(git_remote_status)
%{$fg_bold[cyan]%}%{$reset_color%} ' %{$fg_bold[cyan]%}%{$reset_color%} '
RPROMPT='${return_status}%{$reset_color%}' RPROMPT='${return_status}%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[grey]%}(%{$fg[red]%}" ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[grey]%}(%{$fg[red]%}"