Only show user@host on remote machines
This commit is contained in:
parent
7cf88c785e
commit
41d79867d9
1 changed files with 5 additions and 1 deletions
6
zshrc
6
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue