Consider enabling --color by default

Bug #1691214 reported by Jeremy Bicha on 2017-05-16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
iproute2 (Ubuntu)
David Britton

Bug Description

The output of

ip --color a

looks a lot nicer to me than

ip a

If you look in /etc/skel/.bashrc you can see that we already enable color for other commands:
 alias ls='ls --color=auto'
 alias grep='grep --color=auto'
 alias fgrep='fgrep --color=auto'
 alias egrep='egrep --color=auto'

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in iproute2 (Ubuntu):
status: New → Confirmed

Hi Jeremy,
the difference of this and the tools we already do so is a hard enable vs auto mode.

The cases we already have are handling --color=auto to only add color if running on a terminal.
Instead the --color of ip is a hard enable.

So if you e.g. do:
$ ip --color a > /tmp/foo

Or if we would set up an alias
$ ip a > /tmp/foo

Then the file would contain control chars which no on wants (and could break parsing/monitoring).
I checked latest upstream git of iproute and it still is that way.

So I'd assume the best would be to file a bug upstream and link it here - what do you think Jeremy?

tags: added: needs-upstream-report
Changed in iproute2 (Ubuntu):
assignee: nobody → David Britton (davidpbritton)
David Britton (davidpbritton) wrote :

Adding -colorauto patch to ip. It allows the behavior requested. Tested build and install on bionic. Will in parallel work on sending the patch upstream.

The attachment "iproute2_4.14.1-0ubuntu3.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers