Bug 162605

Summary: Malformed title bar in konsole window
Product: [Applications] konsole Reporter: Andrea <mariofutire>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED NOT A BUG    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Andrea 2008-05-25 17:20:42 UTC
Version:            (using KDE 4.0.4)
Installed from:    Fedora RPMs

Description of problem:

The title bar text does not match the Tab title format.

Version-Release number of selected component (if applicable):

Fedora 9, KDE 4.0.4-2.fc9.i386, Konsole 2.0

How reproducible:

Always

Steps to Reproduce:
1. Set (or leave default) Tab tile format to "%d : %n"
2. cd to /usr/bin
  
Actual results:

Title bar reads         "usr/b : bash"

Expected results:

bin : bash

Additional info:

No all directories are displayed wrongly.
Most of the short ones (e.g. /tmp, /usr/bin, /usr/lib, /lib) are wrong, but NOT
/usr.
Longer names are displayed properly.
If instead "%D : %n" is used, the result is good.
Comment 1 Robert Knight 2008-05-25 17:39:34 UTC
Hello,

This is a 'feature' rather than a bug.  The reason is that folder names such as "bin","lib","tmp" etc. are very common which makes it difficult to tell multiple tabs apart from their title.  When these names are encountered in the directory path they are shortened to a single letter and the name of the preceding directory is added.

So supposed you have 3 tabs open:

/usr/bin , ...myproject/bin, myproject/src, anotherproject/src

Ordinarily they would be shortened to:

bin : <prog> , bin : <prog> , src : <prog> , src : <prog>

Which would make the tabs difficult to tell apart.  Instead the result is:

/usr/b : <prog> , myproject/b : <prog> , myproject/s : <prog> , anotherproject/s : <prog> 

If there are multiple "common names" in a path then they are successively shortened until the first 'uncommon' name is encountered.

There is a hidden config setting, "CommonDirNames" which can be set in .kde/share/config/konsolerc to control which directory names are shortened in this fashion.  
Comment 2 Kevin Kofler 2008-05-25 18:06:48 UTC
Closing as invalid as per above comment.