]> err.no Git - dotfiles/commitdiff
add chroot support
authortfheen <tfheen@8da78d58-1cd3-0310-bee5-d77bd1b3e8bf>
Sat, 3 Jan 2004 17:12:27 +0000 (17:12 +0000)
committertfheen <tfheen@8da78d58-1cd3-0310-bee5-d77bd1b3e8bf>
Sat, 3 Jan 2004 17:12:27 +0000 (17:12 +0000)
git-svn-id: file:///svn/tfheen/trunk/dotfiles@248 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf

bashrc

diff --git a/bashrc b/bashrc
index bba7cc1319f9b3a0540c697572587f800de4c7ca..4858e2ceec058ca10d42c9e4a5b3e2652296c58e 100644 (file)
--- a/bashrc
+++ b/bashrc
@@ -23,12 +23,18 @@ ATTR_FET="\[\033[1m\]"
 ATTR_UND="\[\033[4m\]"
 ATTR_INV="\[\033[7m\]"
 ATTR_AV="\[\033[m\]"
+
+CHROOT=""
+if [ -f /etc/debian_chroot ]; then
+    CHROOT="($(cat /etc/debian_chroot))"
+fi
+
 case $TERM in
     linux|*xterm*|ansi|linux-lat)
-        export PS1=": ${ATTR_FET}\u@\h \w \\\$${ATTR_AV} "
+        export PS1=": ${ATTR_FET}\u@\h${CHROOT} \w \\\$${ATTR_AV} "
         export PS2="${ATTR_FET}>${ATTR_AV}";;
     *) 
-        export PS1="\u@\h:\w\$ "
+        export PS1="\u@\h${CHROOT}:\w\$ "
         export PS2=">$";;
 esac