Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 886187 - sys-apps/iproute2: Make colouring of 'ip' output by default optional
Summary: sys-apps/iproute2: Make colouring of 'ip' output by default optional
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-16 00:38 UTC by Luke Bratch
Modified: 2023-03-19 16:24 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to make colouring of 'ip' output by default optional (iproute2-colour-optional.patch,1.40 KB, patch)
2022-12-16 00:38 UTC, Luke Bratch
Details | Diff
Patch to make colouring of 'ip' output by default optional (iproute2-colour-optional-6.2.0.patch,1.36 KB, patch)
2023-03-09 19:44 UTC, Luke Bratch
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Bratch 2022-12-16 00:38:14 UTC
Created attachment 842941 [details, diff]
Patch to make colouring of 'ip' output by default optional

In bug 820236 the colouring of 'ip' output was enabled by default, but with my setup (might be my monitor, my terminal, or my eyes) it is very difficult to read IPv6 addresses.

This patch keeps the functionality asked for by bug 820236 but makes it optional, and sticks to upstream by default.

Thanks
Luke
Comment 1 Mike Gilbert gentoo-dev 2022-12-17 18:19:07 UTC
I would be in favor of simply dropping the patch and sticking with upstream defaults. There's really no strong reason to override this at the distro level.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-12-22 03:52:11 UTC
It's enough of a nicety that I think it's nice to have a USE flag for it, but I guess doing it by default isn't nice wrt expectations, so will need to either go for patch Luke suggests or something functionally equivalent with some -DFOO.
Comment 3 SpanKY gentoo-dev 2022-12-23 05:55:35 UTC
defaulting color to on is better handled as an alias in /etc/bash/bashrc like all our other commands

alias ip='ip --color=auto'
Comment 4 Luke Bratch 2023-03-09 19:44:41 UTC
Created attachment 857075 [details, diff]
Patch to make colouring of 'ip' output by default optional

Old patch doesn't quite apply cleanly against sys-apps/iproute2-6.2.0-r1.
Comment 5 Larry the Git Cow gentoo-dev 2023-03-09 19:59:03 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af7b77d3b451d7d8b58babb471902d07d20ca803

commit af7b77d3b451d7d8b58babb471902d07d20ca803
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2023-03-09 19:55:07 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2023-03-09 19:55:07 +0000

    sys-apps/iproute2: drop iproute2-default-color-auto.patch
    
    This diverges from upstream defaults for no good reason. Users can set
    up a shell alias if they really want to enable colors by default.
    
    Bug: https://bugs.gentoo.org/820236
    Bug: https://bugs.gentoo.org/886187
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 sys-apps/iproute2/{iproute2-6.2.0.ebuild => iproute2-6.2.0-r1.ebuild} | 1 -
 sys-apps/iproute2/iproute2-9999.ebuild                                | 1 -
 2 files changed, 2 deletions(-)
Comment 6 Petr Vaněk gentoo-dev 2023-03-19 16:24:22 UTC
(In reply to Luke Bratch from comment #0)
> but with my setup (might be my monitor, my terminal, or my eyes) it is
> very difficult to read IPv6 addresses.

Do you use dark background? ip accepts COLORFGBG environment variable
which helps to chose colors suitable for dark background, see man ip(8).

In case you like colored output as I do.