changeset 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 dc844728d1d4
children 2cc6556f8903
files bashrc
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/bashrc	Tue Apr 25 11:50:27 2017 +0100
+++ b/bashrc	Tue Apr 25 12:03:06 2017 +0100
@@ -49,14 +49,15 @@
 		VCS_EXTRA=$(hg prompt "{branch} {-{incoming|count}}{+{outgoing|count}}")
 	fi
 	if [[ "x$VCS_EXTRA" != "x" ]]; then
-		echo -ne ' \033[01;38;5;247m'"($VCS_EXTRA)\033[39m"
+		echo -n " ($VCS_EXTRA)"
 	fi
 }
 
+# Limit long paths
+PROMPT_DIRTRIM=2
 # Bold the command prompt and standardise on SUSE format
-#export PS1='\[\033[01m\]\u@\h\[\033[00m\]:\[\033[01m\]\w\[\033[00m\]> '
 # With colour!
-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\] '
+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\] '
 
 # Fix "less" highlighting
 export LESS_TERMCAP_so=$'\033[30;48;5;247m'