summaryrefslogtreecommitdiff
path: root/.bash-powerline.sh
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2020-02-16 17:52:57 +0100
committerMarc Vertes <mvertes@free.fr>2020-02-16 17:52:57 +0100
commit42737851fb9343a1d49ad1cce7ea1a2a0a9fdd2b (patch)
treed9fda433573af9320c515403ac0e933ee78f7cb1 /.bash-powerline.sh
parent1abd0acce843758cf2b248fbd3874623d68879a2 (diff)
feat: improve prompt
Diffstat (limited to '.bash-powerline.sh')
-rw-r--r--.bash-powerline.sh8
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
}