Bug 836800 - console title too long
Summary: console title too long
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: guake
Version: 17
Hardware: All
OS: All
unspecified
low
Target Milestone: ---
Assignee: Pierre-YvesChibon
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-01 14:17 UTC by Ruggero
Modified: 2012-07-01 16:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-01 15:46:13 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ruggero 2012-07-01 14:17:00 UTC
Description of problem: the title of the console is too long


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


How reproducible:


Steps to Reproduce:
1. cd directory1
2. cd directory2
3. ...

  
Actual results:
the title in the bar is too long, it should be better to truncate it

Expected results:


Additional info:
my $PS1 is
\[\033[0;35m\]\u@\h:\[\033[0;33m\]\w\[\033[00m\]>

Comment 1 Pierre-YvesChibon 2012-07-01 15:46:13 UTC
I think it relies on your PS1, so this is up to you to customize it.

You may want to bring this to upstream but as far as Fedora is concerned, this is not a bug to me.

Comment 2 Ruggero 2012-07-01 16:00:38 UTC
yes, it is not a bug, but I think you should fix it. With some special PS1 (for example mine) guake is unusable. Also for very long directory.

I think you should add something like this:

string shorten_title(const string & console_title_display, int max_length)
{
   return console_title_display.substr(0, max_length-3) + "...";
}

string console_title = ...
string console_title_display = console_title;
if (console_title_display > MAX_TITLE_LENGTH) {
   console_title_display = shorten_title(console_title_display,
                                         MAX_TITLE_LENGTH);
}

Comment 3 Pierre-YvesChibon 2012-07-01 16:11:53 UTC
Feel free to propose a patch upstream to shorten it when needed, the sources are on both github and gitorious.


Note You need to log in before you can comment on or make changes to this bug.