> Changing the title bar dynamically can be done with the PROMPT_COMMAND
> environment variable (in bash). In my bashrc I have:
> 
> function settitle
> {
> #  title="[EMAIL PROTECTED]:(`date +%k:%M:%S`):`pwd`"
>   title="[EMAIL PROTECTED]:(`date +%k:%M:%S`):`history 1`"
>   echo -n "^[]2;$title^G" > /dev/tty
> }
> 
> if [ $TERM = "xterm" ] || [ $TERM = "xterm-color" ]; then
>     PROMPT_COMMAND=settitle
>     PS1='\h:\u > '
> fi

that would work too, but I think its a bit too complicated, I use this now:
HBLK='[[1;30m'
HBLU='[[1;34m'
BLU='[[0;34m'
YEL='[[0;33m'
WHT='[[0;37m'
NORM='[[1;0m'

case "$TERM" in
  xterm)
    export
PS1='[EMAIL PROTECTED]
\[\033]0;[EMAIL PROTECTED] \w\007\]'
  ;;
  *)
    export
PS1='[EMAIL PROTECTED]
\]\[$NORM\]\[$YEL\][\[$WHT\]\w\[$YEL\]]\[$NORM\]\$ '
  ;;
esac

this one has a color prompt.. :)

> 
> The second one only lists the last command executed. Don't know how to
> list the current one.

ah, I don't see any way of doing it..

Attachment: pgpIM4IHBiJFH.pgp
Description: PGP signature

Reply via email to