From 5c4a1675abd27204c313018783894817e0445a5b Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 23 Aug 2016 10:33:27 +1200 Subject: Experiment with abbreviated prompt And an even more strict tmux environment --- bash/bashrc.d/prompt.bash | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bash/bashrc.d') 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)' -- cgit v1.2.3