aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bash/bashrc.d/prompt.bash3
-rw-r--r--pdksh/pdkshrc.d/prompt.pdksh3
2 files changed, 4 insertions, 2 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash
index d4414406..3fc7ad13 100644
--- a/bash/bashrc.d/prompt.bash
+++ b/bash/bashrc.d/prompt.bash
@@ -17,8 +17,9 @@ prompt() {
# Basic prompt shape depends on whether we're in SSH or not
PS1=
- [[ -n $SSH_CLIENT ]] && [[ -n $SSH_CONNECTION ]] &&
+ if [[ -n $SSH_CLIENT ]] || [[ -n $SSH_CONNECTION ]] ; then
PS1=$PS1'\u@\h:'
+ fi
PS1=$PS1'\w'
# Add sub-commands; VCS, job, and return status checks
diff --git a/pdksh/pdkshrc.d/prompt.pdksh b/pdksh/pdkshrc.d/prompt.pdksh
index 67844779..8504153c 100644
--- a/pdksh/pdkshrc.d/prompt.pdksh
+++ b/pdksh/pdkshrc.d/prompt.pdksh
@@ -17,8 +17,9 @@ prompt() {
on)
# Basic prompt shape depends on whether we're in SSH or not
PS1=
- [[ -n $SSH_CLIENT ]] && [[ -n $SSH_CONNECTION ]] &&
+ if [[ -n $SSH_CLIENT ]] || [[ -n $SSH_CONNECTION ]] ; then
PS1=$PS1'\u@\h:'
+ fi
PS1=$PS1'\w'
# Add sub-commands; VCS, job, and return status checks