[pacman-dev] [PATCH 2/3] makepkg: use portable escape sequence for terminal escapes

Dan McGee dpmcgee at gmail.com
Thu Oct 14 13:21:15 EDT 2010


On Thursday, October 14, 2010, Andres Perera <andres.p at zoho.com> wrote:
> On Thu, Oct 14, 2010 at 12:08 PM, Dan McGee <dpmcgee at gmail.com> wrote:
>> On Thu, Oct 14, 2010 at 11:32 AM, Carlos Diaz <839273 at gmail.com> wrote:
>>> The escape string isn't necesarily \033; it's determined by what the
>>> particular termcap/info entry for that terminal contains.
>>>
>>> Bash uses ncurses functions to expand \e to the _correct_ terminal
>>> escape.
>>>
>>> Signed-off-by: Carlos Diaz <839273 at gmail.com>
>>
>> How would this affect a particular bit of code in
>> src/pacman/callback.c; can we do anything there to make sure we are
>> doing it right? Or is \033 right in almost all situations anyway, and
>> this patch is mainly just for pedantic purposes.
>
> As long as you don't want to maintain compatibility with legacy terminals,
> it's pedantic. You'd have to ask yourself if being correct in this case is
> worth linking against ncurses.
>
> Granted I haven't looked at it yet, so I might just end recommending that
> pacman shouldn't be using terminal escapes in the first place.

If you read the code in question you'll see why we use them and also
why it isn't a big deal.

-Dan


More information about the pacman-dev mailing list