aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2016-10-10 16:05:15 +0200
committerDuncaen <mail@duncano.de>2016-10-10 16:05:15 +0200
commit6e8400a968a98d896764257eee211b1063bc3300 (patch)
treedda29a987ba778cad99dbe7217e6fb5f7ad639f8
parent735e32d8efafd6bc8c63f0fba7d2c81b353ffa01 (diff)
downloaddotfiles-6e8400a968a98d896764257eee211b1063bc3300.tar.gz
mksh: add host name to prompt for ssh connections
-rwxr-xr-xmkshrc.d/90-prompt.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/mkshrc.d/90-prompt.sh b/mkshrc.d/90-prompt.sh
index 652ad90..ea01491 100755
--- a/mkshrc.d/90-prompt.sh
+++ b/mkshrc.d/90-prompt.sh
@@ -1 +1 @@
-PS1='$(d=${PWD/$HOME/\~};print ${d##*/})$(((r=$?))&&print "?\e[0;31;40m$r\e[0m")$(((USER_ID))&&print \$||print \#) '
+PS1='$(d=${PWD/$HOME/\~};print ${d##*/})$(((r=$?))&&$([ -n "$SSH_CONNECTION" ] && print "@${HOSTNAME:=$(hostname)}"||true)&&print "?\e[0;31;40m$r\e[0m")$(((USER_ID))&&print \$||print \#) '