summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bash-powerline.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/.bash-powerline.sh b/.bash-powerline.sh
index 65bdf38..59843ce 100644
--- a/.bash-powerline.sh
+++ b/.bash-powerline.sh
@@ -84,7 +84,10 @@ __powerline() {
local git="$COLOR_GIT$(__git_info)$RESET"
fi
- PS1="$cwd$git$symbol"
+ PS1="$cwd$git$symbol"
+
+ # Display hostname in prompt if in a remote shell
+ [ "$SSH_TTY" ] && PS1="\\h:$PS1"
}
PROMPT_COMMAND="ps1${PROMPT_COMMAND:+; $PROMPT_COMMAND}"