Bug 206316 - Abbreviate home dir with a tilde in dynamic tab name
Summary: Abbreviate home dir with a tilde in dynamic tab name
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Unspecified
: NOR wishlist
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-05 02:46 UTC by furue
Modified: 2010-10-13 21:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.6


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description furue 2009-09-05 02:46:55 UTC
Version:            (using KDE 4.2.4)
Installed from:    Debian testing/unstable Packages

I would be nice if konsole abbreviated the home directory with a tilde in the dynamic tab name.  Currently, I set "%D" for the tab name, which is more convenient to me than "%d" because I have many directory of the same name, such as "etc" and "utils".  But, since I spend most of time under my home directory, "/home/something/username" is redundant and takes up unnecessary space of the tab, which is already scarce.  So, I wish the home directory be abbreviated to "~" as with bash's "\w" prompt string (See the "PROMPTING" section of "man bash").

Regards,
Ryo
Comment 1 Robert Knight 2009-09-05 13:23:20 UTC
Some common directory names such as src,tmp are handled specially by abbreviating them to a single letter and then prepending the name of the previous directory to give more context.  You can change the list of 'common' directory names by adding the following to your konsolerc file (usually found in ~/.kde/share/config/)

[ProcessInfo]
CommonDirNames=src,tmp,etc,utils (etc.)
Comment 2 furue 2009-09-07 02:38:30 UTC
(In reply to comment #1)
> Some common directory names such as src,tmp are handled specially by
> abbreviating them to a single letter and then prepending the name of the
> previous directory to give more context.  You can change the list of 'common'
> directory names by adding the following to your konsolerc file (usually found
> in ~/.kde/share/config/)
> 
> [ProcessInfo]
> CommonDirNames=src,tmp,etc,utils (etc.)

Thanks, but it's not clear to me how to abbreviate my home directory ("/home/somedir/myusername") to "~".  I've added the following two lines to ~/.kde/share/config/konsolerc  (Yes, the file had existed before I did anything to it)

[ProcessInfo]
CommonDirNames=/home/somedir/myusername

and invoked konsole, but nothing changed.
Comment 3 Kurt Hindenburg 2010-10-13 21:57:32 UTC
SVN commit 1185589 by hindenburg:

In the tab title, for %D change the user's home path with a ~ if it starts at the 
beginning.

FEATURE: 206316
FIXED-IN: 4.6


 M  +28 -1     ProcessInfo.cpp  
 M  +7 -0      ProcessInfo.h  
 M  +3 -0      Session.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1185589