Hi, alias ip='ip --color=auto' would enable helpful highlighting for this command I have not seen any issues with this myself and it seems useful enough thing for such a common tool.
Created attachment 746838 [details, diff] iproute2-default-color-auto.patch I have been using this patch on all my systems for awhile now. It is completely shell agnostic, and enables coloured output if outputting to a terminal. Just drop this at /etc/portage/patches/sys-apps/iproute2/iproute2-default-color-auto.patch and rebuild iproute2.
Hi, I'd considered that approach but didn't want to change ip from how it comes as much as I agree the default should be this way round. The alias in system bashrc would make a nicer default in many situations, and it felt the best way to get a certain system behavior for some handbook related stuff
I've ended up with other patches so started using this too, it was only a matter of time before the merits became evident, ty. Is there a reason why the patch isn't in by default? no-color exists for those who want it and everyone else saves brain work if this is enabled, also with ipv6 having multiple addresses I find it even more useful. Regards
Why colour is off by default is a question for upstream, Gentoo tries not to apply patches to upstream packages unless there is a good reason for said patch.
it's in the general interest of most users any issues with tty detection must be irrelevant if grep can have color=auto upstream looks difficult to interact with about this, whatever the actual reason time alone categorises it as deadlock thinking wider, if you can accept that there is an energy and attention cost to processing text and that we can use colours to reduce this load, then it's also beneficial that's about all I can think of, if I should rename the bug or do something other than just close it please let me know
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=536cf403364a92aa6dbfb443da92ce5fe2e71277 commit 536cf403364a92aa6dbfb443da92ce5fe2e71277 Author: Patrick McLean <chutzpah@gentoo.org> AuthorDate: 2022-08-12 19:24:13 +0000 Commit: Patrick McLean <chutzpah@gentoo.org> CommitDate: 2022-08-12 19:24:13 +0000 sys-apps/iproute2: Revbump, enable colour by default (bug #820236) Also add patch to 9999 ebuild. Closes: https://bugs.gentoo.org/820236 Signed-off-by: Patrick McLean <chutzpah@gentoo.org> sys-apps/iproute2/files/iproute2-default-color-auto.patch | 7 +++++++ .../iproute2/{iproute2-5.19.0.ebuild => iproute2-5.19.0-r1.ebuild} | 1 + sys-apps/iproute2/iproute2-9999.ebuild | 1 + 3 files changed, 9 insertions(+)
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(-)