]> git.ipfire.org Git - thirdparty/iproute2.git/commit
color: disable color when json output is requested
authorVincent Bernat <vincent@bernat.im>
Tue, 20 Feb 2018 23:28:04 +0000 (00:28 +0100)
committerStephen Hemminger <stephen@networkplumber.org>
Fri, 23 Feb 2018 16:18:33 +0000 (08:18 -0800)
commit1ca4341d2c6bcdaf19fb7e3cdd0b39207a29941d
treeb17bae5ce0fc523903fb523f7f0afb3f91bc171f
parent2fb854d07cb80fe11593b9da8f34feb62b7e401e
color: disable color when json output is requested

Instead of declaring -color and -json exclusive, ignore -color when
-json is provided. The rationale is to allow to put -color in an alias
for ip while still being able to use -json. -color is merely a
presentation suggestion and we can assume there is nothing to color in
the JSON output.

Signed-off-by: Vincent Bernat <vincent@bernat.im>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
include/color.h
ip/ip.c
lib/color.c