aboutsummaryrefslogtreecommitdiff
path: root/bash/bashrc.d/prompt.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-23 10:33:27 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-23 10:33:27 +1200
commit5c4a1675abd27204c313018783894817e0445a5b (patch)
treec81c98eaeef9f941d8e3ab4453fdeed3c7e80102 /bash/bashrc.d/prompt.bash
parentExtract actual media from GitHub/Imgur links (diff)
downloaddotfiles-5c4a1675abd27204c313018783894817e0445a5b.tar.gz
dotfiles-5c4a1675abd27204c313018783894817e0445a5b.zip
Experiment with abbreviated prompt
And an even more strict tmux environment
Diffstat (limited to 'bash/bashrc.d/prompt.bash')
-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)'