1

Use colors to show remote connections

This commit is contained in:
Evan Pratten 2022-08-29 11:13:02 -04:00
parent d10c4d9c25
commit 2be2733c1b

@ -4,7 +4,15 @@
autoload -U colors && colors
NEWLINE=$'\n'
export PROMPT="%{$fg[green]%}%n@%M %{$fg[cyan]%}%~ $ %{$reset_color%}"
# Use colors to signal local vs remote connections
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
HOST_COLOR="yellow"
else
HOST_COLOR="green"
fi
export PROMPT="%{$fg[$HOST_COLOR]%}%n@%M %{$fg[cyan]%}%~ $ %{$reset_color%}"
setopt prompt_subst
autoload -Uz vcs_info
zstyle ':vcs_info:*' actionformats \