Browse Source

Only print username on a remote (assume SSH) sessions

Alois Mahdal 10 years ago
parent
commit
f419b456ca
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      dotfiles/bash/post.bashrc

+ 1
- 1
dotfiles/bash/post.bashrc View File

@@ -30,7 +30,7 @@ __save_rv() {
30 30
 make_ps1() {
31 31
     # these functions must be already defined by ~/.bash/user/*.bashrc
32 32
     # and ~/.bash/host/*.bashrc
33
-    local ps1u=$(make_ps1u)
33
+    test -n "$SSH_CONNECTION" && local ps1u=$(make_ps1u)
34 34
     local ps1h=$(make_ps1h)
35 35
     local ps1w="$lblue\w$normal";
36 36
     local ps1G='$(__git_ps1 "(%s)")';