From: tfheen Date: Sat, 3 Jan 2004 17:12:27 +0000 (+0000) Subject: add chroot support X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0faa954ece4386f7bc1d4ae7c2cccfb16b7de1cd;p=dotfiles add chroot support git-svn-id: file:///svn/tfheen/trunk/dotfiles@248 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf --- diff --git a/bashrc b/bashrc index bba7cc1..4858e2c 100644 --- 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