diff options
Diffstat (limited to 'bash/bashrc.d/prompt.bash')
-rw-r--r-- | bash/bashrc.d/prompt.bash | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash index da8262ad..c4293aae 100644 --- a/bash/bashrc.d/prompt.bash +++ b/bash/bashrc.d/prompt.bash @@ -10,6 +10,11 @@ prompt() { PROMPT_COMMAND='ret=$? ; history -a' PS1='\[\a\][\u@\h:\w]$(prompt vcs)$(prompt job)$(prompt ret)\$' + # If Bash 4.0 is available, trim very long paths in prompt + if ((${BASH_VERSINFO[0]} >= 4)); then + PROMPT_DIRTRIM=4 + fi + # Count available colors, reset, and format (decided shortly) local colors=$(tput colors) local reset=$(tput sgr0) |