aboutsummaryrefslogtreecommitdiff
path: root/ksh
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-01-27 13:03:09 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-01-27 13:03:56 +1300
commit8cc85ff3ffe5ebd1260ed276fc2b35621ccfba55 (patch)
treeb156c22a29e861b3fb5809365d10e1cfc1b8da26 /ksh
parentd5f521fb213c82fbd68fad8f5e36d61527bb0757 (diff)
downloaddotfiles-8cc85ff3ffe5ebd1260ed276fc2b35621ccfba55.tar.gz
Extend "fallback" prompt a bit
Include username/hostname if no SSH variables
Diffstat (limited to 'ksh')
-rw-r--r--ksh/kshrc.d/prompt.ksh5
1 files changed, 4 insertions, 1 deletions
diff --git a/ksh/kshrc.d/prompt.ksh b/ksh/kshrc.d/prompt.ksh
index 1dcbd864..3f526526 100644
--- a/ksh/kshrc.d/prompt.ksh
+++ b/ksh/kshrc.d/prompt.ksh
@@ -188,10 +188,13 @@ function prompt {
# Revert to simple inexpensive prompts
off)
- PS1='\$ '
+ PS1='$ '
PS2='> '
PS3='? '
PS4='+ '
+ if [[ -n $SSH_CLIENT || -n $SSH_CONNECTION ]] ; then
+ PS1=$(id -nu)'@'$(hostname -s)'$ '
+ fi
;;
# Abbreviated working directory