Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 820236 - app-shells/bash: Add support for coloring 'ip' output by default
Summary: app-shells/bash: Add support for coloring 'ip' output by default
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: 2021-10-25 16:18 UTC by Jonathan Plews
Modified: 2021-11-23 10:24 UTC (History)
4 users (show)

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


Attachments
iproute2-default-color-auto.patch (iproute2-default-color-auto.patch,186 bytes, patch)
2021-10-26 17:48 UTC, Patrick McLean
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Plews 2021-10-25 16:18:05 UTC
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.
Comment 1 Patrick McLean gentoo-dev 2021-10-26 17:48:31 UTC
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.
Comment 2 Jonathan Plews 2021-10-28 09:29:18 UTC
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