From 42737851fb9343a1d49ad1cce7ea1a2a0a9fdd2b Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Sun, 16 Feb 2020 17:52:57 +0100 Subject: feat: improve prompt --- .bash-powerline.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 } -- cgit v1.2.3