Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Set the title of the Terminal window with cd' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Set the title of the Terminal window with cd
Authored by: jwbales on May 04, '06 10:29:19PM
Why not just set PROMPT_COMMAND in your .bashrc?
export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}: ${PWD/#$HOME/~}\007"'
If $PROMPT_COMMAND is set, the contents of the variable are executed each time a command is ran before returing the command prompt.

[ Reply to This | # ]