How to make terminal "title" to be set dynamically to pwd

François Colonna f.colonnacesari at free.fr
Wed Sep 14 14:49:25 CEST 2011


Le mercredi 14 septembre 2011 à 12:20 +0200, TRINH Minh Hieu a écrit :

>         
>         Hello
>         
>         I did not find out how to make any terminal "title" to be set
>         dynamically to the result of pwd command.
>         
>         By "title" I mean the text at the top of the terminal window
>         not the
>         prompt.
>         
>         By "dynamically set" I mean, that when I move to a new
>         directory with cd
>         command, the title will be automatically modified to the new
>         directory
>         name.
>         
>         Thanks
>         Fran?ois Colonna
>         
> 
> Put this on your .bashrc : 
> export PROMPT_COMMAND='echo -ne "\033]0;`pwd`\007"'
> 
> Normally, the window title (and not the prompt) will look like :
> "Terminal - /root/Public"
> 
> Regards, 
> 
>    mhtrinh

Thanks it works fine.
Best 
François




More information about the Xfce mailing list