aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d
diff options
context:
space:
mode:
Diffstat (limited to 'bash/bashrc.d')
-rw-r--r--bash/bashrc.d/prompt.bash7
1 files changed, 5 insertions, 2 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash
index e61b69d5..2559d9d8 100644
--- a/bash/bashrc.d/prompt.bash
+++ b/bash/bashrc.d/prompt.bash
@@ -15,8 +15,11 @@ prompt() {
# If Bash 4.0 is available, trim very long paths in prompt
((BASH_VERSINFO[0] >= 4)) && PROMPT_DIRTRIM=4
- # Basic prompt shape
- PS1='\u@\h:\w'
+ # Basic prompt shape depends on whether we're in SSH or not
+ PS1=
+ [[ -n $SSH_CONNECTION ]] &&
+ PS1=$PS1'\u@\h:'
+ PS1=$PS1'\w'
# Add sub-commands; VCS, job, and return status checks
PS1=$PS1'$(prompt vcs)$(prompt job)$(prompt ret)'