Make your console nicer and more useful:user-) cd Download/
WD=/home/user/Download
user-Download-)
Insert this code to .bashrc file in your home folder:
function SetPS1()
{
local HostBit=""
if test "$OS" = "Linux"
then
if test "`who|grep "$USER"|grep \"tty[1-6]\"`" = ""
then
HostBit="@\h"
fi
fi
local DirBit="-\W"
test "`pwd`" = "$HOME" && DirBit=""
case "$TERM" in
xterm|linux) PS1="\[[00;31m\]\u\[[00;33m\]$HostBit\[[00;32m\]$DirBit\[[0m\]-) " ;;
*) PS1="\u$HostBit$DirBit-) " ;;
esac
}
SetPS1
thcd()
{
builtin cd "$@"
if test -t 1
then
case $TERM in
xterm) echo "WD=[00;31m`pwd`[0m" >&2
echo -n "]0;XT `basename \"\`pwd\`\"`" >&2 ;;
*) echo "WD=`pwd`" >&2 ;;
esac
fi
SetPS1
}
alias cd='thcd'