Setting the terminal window title - version 2
I had earlier written a small snippet about setting the window title from command line. Based on my experience, I felt that I could make it a lot simpler. Here is version of the same function.
function wtitle {
if [ -z "$ORIG_PS1" ] ; then
ORIG_PS1=$PS1
fi
export PS1="\[\033]0;$1 - \u@\h:\w\007\]$ORIG_PS1"
}
Comments