diff options
| -rw-r--r-- | .bash-powerline.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/.bash-powerline.sh b/.bash-powerline.sh index e635b11..338ca9d 100644 --- a/.bash-powerline.sh +++ b/.bash-powerline.sh @@ -17,6 +17,12 @@ __powerline() { readonly SYMBOL_GIT_PUSH='↑' readonly SYMBOL_GIT_PULL='↓' + if test -f "../usr/etc/hostname"; then + readonly host=$(<"../usr/etc/hostname") + else + readonly host=$(hostname) + fi + if [[ -z "$PS_SYMBOL" ]]; then case "$(uname)" in # Darwin) PS_SYMBOL='';; @@ -86,7 +92,7 @@ __powerline() { PS1="$cwd$git$symbol" if [ "$SSH_TTY" ]; then - PS1="\\h:$PS1" + PS1="$host:$PS1" fi } |
