summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2010-08-12 13:33:50 -0400
committerColin Walters <walters@verbum.org>2010-08-12 13:33:50 -0400
commit93e2ba314eecbb86a9872d4048bb196107d7d544 (patch)
tree058263c049565d9855c54f5e59b43d92702e1038
parent7fabf88041d4594b6ddeb4b22323c66677e31c3e (diff)
downloadhomegit-MOVED-TO-GNOME-93e2ba314eecbb86a9872d4048bb196107d7d544.zip
homegit-MOVED-TO-GNOME-93e2ba314eecbb86a9872d4048bb196107d7d544.tar.gz
homegit-MOVED-TO-GNOME-93e2ba314eecbb86a9872d4048bb196107d7d544.tar.xz
[bashrc] Some bold etc for bash prompt clarity
-rw-r--r--dotfiles/bashrc15
1 files changed, 9 insertions, 6 deletions
diff --git a/dotfiles/bashrc b/dotfiles/bashrc
index 5077eca..1d4f72a 100644
--- a/dotfiles/bashrc
+++ b/dotfiles/bashrc
@@ -22,13 +22,16 @@ _format_wd ()
base=$(basename $pwd)
parent=$(basename $(dirname $pwd))
pparent=$(basename $(dirname $parent))
- if test pparent != "/"; then
- echo "$parent/$base"
+ if test $pparent != "/"; then
+ echo -n "$parent/";
+ tput bold; echo -n $base; tput sgr0
else
- if test parent != "/"; then
- echo "/$parent/base"
+ if test $parent != "/"; then
+ echo -n "/$parent/"
+ tput bold; echo -n $base; tput sgr0
else
- echo "/$base"
+ echo -n "/";
+ tput bold; echo -n $base; tput sgr0
fi
fi
}
@@ -47,7 +50,7 @@ _format_inroot_dir ()
_format_uid ()
{
if test $(id -u) = '0'; then
- echo " <uid=0>"
+ echo -n " <"; tput rev; echo -n "uid=0"; tput sgr0; echo -n ">";
fi
}