Mercurial > repos > other > linux
comparison bashrc @ 66:091d9fc4698b
Limit path length and fix a colouring/wrapping bug that it highlighted
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Tue, 25 Apr 2017 12:03:06 +0100 |
parents | 39b07c5f8785 |
children | 2cc6556f8903 |
comparison
equal
deleted
inserted
replaced
65:dc844728d1d4 | 66:091d9fc4698b |
---|---|
47 if [[ "x$VCS_EXTRA" == "x" ]]; then | 47 if [[ "x$VCS_EXTRA" == "x" ]]; then |
48 #FIXME: Currently shows "-" even when no incoming changes | 48 #FIXME: Currently shows "-" even when no incoming changes |
49 VCS_EXTRA=$(hg prompt "{branch} {-{incoming|count}}{+{outgoing|count}}") | 49 VCS_EXTRA=$(hg prompt "{branch} {-{incoming|count}}{+{outgoing|count}}") |
50 fi | 50 fi |
51 if [[ "x$VCS_EXTRA" != "x" ]]; then | 51 if [[ "x$VCS_EXTRA" != "x" ]]; then |
52 echo -ne ' \033[01;38;5;247m'"($VCS_EXTRA)\033[39m" | 52 echo -n " ($VCS_EXTRA)" |
53 fi | 53 fi |
54 } | 54 } |
55 | 55 |
56 # Limit long paths | |
57 PROMPT_DIRTRIM=2 | |
56 # Bold the command prompt and standardise on SUSE format | 58 # Bold the command prompt and standardise on SUSE format |
57 #export PS1='\[\033[01m\]\u@\h\[\033[00m\]:\[\033[01m\]\w\[\033[00m\]> ' | |
58 # With colour! | 59 # With colour! |
59 export PS1='\[\033[01;38;5;34m\]\u\[\033[01;38;5;28m\]@\[\033[01;38;5;34m\]\h\[\033[39m\]:\[\033[01;38;5;26m\]\w$(test $PWD != / && echo -n /)\[\033[39m\]$(vcs_status)>\[\033[00m\] ' | 60 export PS1='\[\033[01;38;5;34m\]\u\[\033[01;38;5;28m\]@\[\033[01;38;5;34m\]\h\[\033[39m\]:\[\033[01;38;5;26m\]\w$(test $PWD != / && echo -n /)\[\033[39m\]\[\033[01;38;5;247m\]$(vcs_status)\[\033[39m\]>\[\033[00m\] ' |
60 | 61 |
61 # Fix "less" highlighting | 62 # Fix "less" highlighting |
62 export LESS_TERMCAP_so=$'\033[30;48;5;247m' | 63 export LESS_TERMCAP_so=$'\033[30;48;5;247m' |
63 export LESS_TERMCAP_se=$'\033[0m' | 64 export LESS_TERMCAP_se=$'\033[0m' |