lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 23 May 2024 06:16:51 +0800
From: Gedalya <gedalya@...alya.net>
To: Stephen Hemminger <stephen@...workplumber.org>,
 Dragan Simic <dsimic@...jaro.org>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] [resend] color: default to dark background

On 5/23/24 5:33 AM, Stephen Hemminger wrote:

> The color handling of iproute2 was inherited from other utilities such as vim.
> There doesn't appear to be any library or standardization, all this ad-hoc.

Looking at the vim code, and playing around with the program, I
have a few observations.

The snippet you quoted isn't doing anything brilliant. It just
assumes that certain types of terminals are dark, regardless of
the implementation and configuration. All you can really say is
that terminals are often dark which is what I was saying here in
the first place.

I'm not seeing any justification for assuming dark in certain
cases and light otherwise. The code just happens to be that way.

More importantly, vim does happen to actually work. So far I was
only able to get it to show dark blue on a black background by
setting TERM=ansi.

The results are what is important. Vim has its own various color
palettes and it's a serious full-screen app, uses the terminfo
library, its support for terminals is much more complex than just
two palettes. One way or another, we need to fix this, probably
not by linking against ncurses, and "assuming terminal backgrounds
are light" isn't the nugget of wisdom vim has to offer.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ