GNOME Bugzilla – Bug 110979
RFE: The label on tabs should be ellipsized the other way round
Last modified: 2006-02-02 18:11:10 UTC
This is very debatable, I guess, but anyway. Currently, the label on a screen tab gets ellipsized so that the ending of the text is replaced by an ellipsis. If, say, the bash prompt is set up so that it puts the cwd on the term title, then what you'll see when space starts getting short is the begining of the path, which is not usually the most significant part of it. Next is a patch which changes that. One has to change eel/eel-ellipsizing-label, because right now things are set up so that making it ellipsize from the start causes it to right-justify the labels, and that looks ugly. This could easily be fixed by changing the prompt, too, at least for the problem with bash-prompts in tabs... This could become a key in /apps/gnome-terminal/global. IMO tab labels should have tooltips with the whole title, too, but thats another matter...
Created attachment 15782 [details] [review] Path to change ellipsizing mode on terminal tab labels
Hmm, what if your title is a hostname? It might need to be a pref, but there are a lot of other requests for prefs, more than will fit in the prefs dialog. So we'd kind of need to make a list and prioritized. I created a "pref" keyword the other day to support making the list but then I didn't go through and tag the bugs yet. ;-) One thing we can do on Linux and Solaris at least is set working directory as title without using shell prompt hacks, and then we'd know it was a directory and be able to handle it properly, but I don't know if that's a full solution. This would add a pref also, so it doesn't really get us anywhere. Probably a bad idea.
Having g-t set the title to the cwd would not work: mainly because you'd then have applications (eg, vim) that set the term title fighting g-t for it. There is no Right Choice in choosing what gets chopped off the label. One Bad Choice would be to s/EEL_ELLIPSIZE_START/EEL_ELLIPSIZE_MIDDLE/ in terminal-window.c.
Created attachment 15784 [details] [review] Oops. Apply this after the last patch: can't have a zero property_id...
Havoc, any changes here?
I think this needs more thought on whether to add the pref etc.
Downing pri based on #6
Mariano is now the maintainer, so...
OK, let's consider a few points here. First, the default behaviour suits most situations, there aren't many exceptions for that. Second, no matter how much gnome-terminal is targeted at power users, adding a preference for that would be trashing the whole "Just Works (tm)" moto, while there are also a pile of more important preferences pending implementing (or simply applying a patch) because there is no space left on the preference dialog. I'll probably accept disagreements on this with good reasoning, but am marking it as WONTFIX for now.
What about making it to ellipsize middle?
You end up possibly hiding anything that's useful on the left and on the right.