diff options
| author | Marc Vertes <mvertes@free.fr> | 2020-01-05 15:00:32 +0100 |
|---|---|---|
| committer | Marc Vertes <mvertes@free.fr> | 2020-01-05 15:00:32 +0100 |
| commit | 9f2377a8b309241ba9c5b74183914ea35f9e5d2e (patch) | |
| tree | 3bc5ab33ef1b09885b14faf55f74999e52bbe2e4 /.bash-powerline.sh | |
| parent | de2d70f1d0a8b132fb931b6d01987ac19cd128d9 (diff) | |
prompt: display host in ssh session
Diffstat (limited to '.bash-powerline.sh')
| -rw-r--r-- | .bash-powerline.sh | 5 |
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}" |
