Only show user@host on remote machines

This commit is contained in:
Eryn Wells 2012-08-20 14:16:16 -07:00
parent 7cf88c785e
commit 41d79867d9

6
zshrc
View file

@ -48,7 +48,11 @@ precmd_separator()
precmd_separator_info()
{
pstr=`print -P "\-\-\( %n@%m \)\-\-\( %~ \)"`
pstr=''
if [ ! -z "$SSH_CONNECTION" ]; then
pstr+=`print -P "\-\-\( %n@%m \)"`
fi
pstr+=`print -P "\-\-\( %~ \)"`
time=`print -P "\( %T \)\-\-"`
filler=$(($COLUMNS - ${#pstr} - ${#time}))
for (( i=0; $i < $filler; i++)); do