Consider enabling --color by default

Bug #1691214 reported by Jeremy Bícha
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
iproute2 (Ubuntu)
Confirmed
Wishlist
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'

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in iproute2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

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
David Britton (dpb)
Changed in iproute2 (Ubuntu):
assignee: nobody → David Britton (davidpbritton)
Revision history for this message
David Britton (dpb) 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.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

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
Revision history for this message
Simon Quigley (tsimonq2) wrote :

Bump; was this patch sent upstream? What is the status of it at the moment?

The attached patch can't be uploaded as-is to any currently-supported release, unsubscribing sponsors (please resubscribe when more details are given).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.