From 41d79867d9d920d6e24ad0243169d76db45cd2c8 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 20 Aug 2012 14:16:16 -0700 Subject: [PATCH] Only show user@host on remote machines --- zshrc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zshrc b/zshrc index 7312243..ff01652 100644 --- a/zshrc +++ b/zshrc @@ -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