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

Andres Perera andres.p at zoho.com
Thu Oct 14 12:45:52 EDT 2010


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.

>
> -Dan
>
>


More information about the pacman-dev mailing list