return to first page linux journal archive
keywordscontents
Home  >  Magazine  >  #64 August 1999  >  Bash Prompt  >  Listing 2
Friday, June 25, 1999 | Last Updated 1:33pm

Listing 2. Function to Set Titlebar

function proml
{ case $TERM in xterm*) local TITLEBAR="\[\e]0;\u@\h:\w\007\]" ;; *) local TITLEBAR="" ;; esac PS1="${TITLEBAR}\ [\$(date +%H%M)]\ [\u@\h:\w]\ \$ " PS2="> " }