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

Richard Kenyon richardlkenyon at gmail.com
Wed Sep 14 12:05:27 CEST 2011


On Wed, 2011-09-14 at 09:34 +0200, François Colonna wrote:
> 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
> 

/Generally/ the terminal "title" contains $PS1
So PS1='\w ' ought to do the trick.

A sane default might be PS1='\u@\h:\w$ '



More information about the Xfce mailing list