From 0faa954ece4386f7bc1d4ae7c2cccfb16b7de1cd Mon Sep 17 00:00:00 2001 From: tfheen Date: Sat, 3 Jan 2004 17:12:27 +0000 Subject: [PATCH] add chroot support git-svn-id: file:///svn/tfheen/trunk/dotfiles@248 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf --- bashrc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 -- 2.39.5