[Buildroot] [PATCH] infra: display current task as title of the term window

Thomas De Schampheleire patrickdepinguin+buildroot at gmail.com
Mon Aug 19 18:49:48 UTC 2013


Op 19-aug.-2013 19:09 schreef "Arnout Vandecappelle" <arnout at mind.be> het
volgende:
>
> On 18/08/13 10:21, Thomas De Schampheleire wrote:
>>
>> On Tue, Aug 13, 2013 at 7:36 AM, Arnout Vandecappelle <arnout at mind.be>
wrote:
>>>
>>> On 07/08/13 08:44, Thomas De Schampheleire wrote:
>>>>
>>>>
>>
>>>> I know that Gentoo has this feature for its portage package
>>>> installation/compilation tool. When you run 'emerge', the titles are
>>>> constantly updated with the package that is being handled, also in
>>>> Konsole. You may be able to find out what the 'right way' is based on
>>>> their sources.
>>>
>>>
>>>
>>>   Are you sure this works for you with emerge? I RTFM'ed it and
according to
>>> the konsole manual, you have to add '%w' to the tab title string to get
the
>>> string set by the shell. Perhaps Gentoo simply sets the default tab
title
>>> string to something including %w.
>>>
>>
>>
>> It does work for emerge, but it seems you are right: the default tab
>> title in Gentoo is set to %w (I didn't set it explicitly). I tried
>> Francois' patch on a non-gentoo system before (didn't work for
>> Konsole) but after explicitly setting %w in the tab title it also
>> works there. So that issue is cleared out.
>>
>> However, while testing again, I noticed an annoyance: if the build
>> process stops prematurely, for example because the build fails or the
>> user interrupts it, the last tab title remains. I would much prefer
>> that we can cleanly restore this no matter how buildroot/make stops.
>
>
>  Won't that be the case regardless of whether the build fails or succeeds?

Currently it is indeed, but that could easily be fixed by adding an extra
such print at the end.

>
>  I think this patch is only really suitable for people who have something
similar in their PS1. Otherwise it will just mess up your window title.
>
>  Also, it should only be done if $TERM == xterm, otherwise you get
annoying stuff when running buildroot from a text console. And in fact, the
same is true of the colouring itself, so we don't get these annoying escape
characters in log files and continuous integration web interfaces.

Agreed.

Best regards,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildroot.org/pipermail/buildroot/attachments/20130819/e2974fda/attachment-0001.html>


More information about the buildroot mailing list