Bug 86005

Summary: show path as session name on tab
Product: [Applications] konsole Reporter: Martin Koller <martin>
Component: generalAssignee: Konsole Bugs <konsole-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: wishlist    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Martin Koller 2004-07-26 13:53:23 UTC
Version:           1.3.90 (using KDE 3.2.92 (3.3 beta2), compiled sources)
Compiler:          gcc version 3.2.3
OS:                Linux (i686) release 2.6.7

A great thing would be an option to show the current path (or at least the last 2-3 dirs on long paths) as the textlabel for a session-tab.
Comment 1 Kurt Hindenburg 2004-07-27 18:50:02 UTC
Per 'Tip of the day':

...that you can let Konsole set the current directory as the window title? For Bash, put 'export PS1=$PS1"\[\e]0;\H:\w\a\]"' in your ~/.bashrc . 
Comment 2 Martin Koller 2004-07-28 10:15:45 UTC
Thanks for the hint, but this is not what I want.
I want to have the path in the _session tab label_, and not in the title.
In addition to this, I'm using tcsh and not bash.

Nevertheless I found a solution also in the "Tip of the day" (It would be good to explain what the mentioned string in the tip is doing, e.g. what the result does look like) or better: explain that the ESC sequence has to be of the form
<ESC>]30;<text to display><BEL>

What I do now in my .tcshrc is:
set prompt='%{\e]30;%}%m[%c3]%{\a%}%m[%c3]# '
which gives something like
hostname[/tmp]#
as the prompt and
hostname[/tmp]
in the tab label.

Maybe you can assign this to the konsole documentation guys, because it was not so easy to find out.
Comment 3 Toni 2007-03-05 17:13:13 UTC
I had to change it slighty to get it to work to the below.

set prompt='%{\e]30;%m[%c3]\a%}%{\a%}%m[%c3]%# '

tcsh and xterm.