Display if we are connected through SSH

This commit is contained in:
Michele Bologna 2016-10-11 21:38:13 +02:00
parent 9263e9ca59
commit 034ad1ecf6

View File

@ -51,6 +51,8 @@ local current_dir="%~"
local username_output="%(!..$username_normal_color$username_command$reset@)" local username_output="%(!..$username_normal_color$username_command$reset@)"
local hostname_output="$hostname_color$hostname_command$reset" local hostname_output="$hostname_color$hostname_command$reset"
[[ $SSH_TTY ]] && hostname_output="$hostname_output ${red}(ssh)$reset"
local current_dir_output="$current_dir_color$current_dir$reset" local current_dir_output="$current_dir_color$current_dir$reset"
local jobs_bg="${red}fg: %j$reset" local jobs_bg="${red}fg: %j$reset"
local last_command_output="%(?.%(!.$red.$green).$yellow)" local last_command_output="%(?.%(!.$red.$green).$yellow)"