From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [iproute PATCH v5 1/2] Make colored output configurable Date: Fri, 17 Aug 2018 14:22:50 -0600 Message-ID: <070af332-d19e-325c-3c13-a8575e914f40@gmail.com> References: <20180817092400.5b2c9173@xeon-e3> <20180817163846.27578-1-phil@nwl.cc> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, Till Maas To: Phil Sutter , Stephen Hemminger Return-path: Received: from mail-pf1-f194.google.com ([209.85.210.194]:35712 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726342AbeHQX1k (ORCPT ); Fri, 17 Aug 2018 19:27:40 -0400 Received: by mail-pf1-f194.google.com with SMTP id p12-v6so3967434pfh.2 for ; Fri, 17 Aug 2018 13:22:53 -0700 (PDT) In-Reply-To: <20180817163846.27578-1-phil@nwl.cc> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 8/17/18 10:38 AM, Phil Sutter wrote: > Allow for -color={never,auto,always} to have colored output disabled, > enabled only if stdout is a terminal or enabled regardless of stdout > state. > > Signed-off-by: Phil Sutter > --- > Changes since v1: > - Allow to override isatty() check by specifying '-color' flag more than > once. > - Document new behaviour in man pages. > > Changes since v2: > - Implement new -color=foo syntax. > - Update commit message and man page texts accordingly. > > Changes since v3: > - Fix typo in tc/tc.c causing compile error. > > Changes since v4: > - Make matches_color() return boolean. > --- > bridge/bridge.c | 3 +-- > include/color.h | 9 +++++++++ > ip/ip.c | 3 +-- > lib/color.c | 33 ++++++++++++++++++++++++++++++++- > man/man8/bridge.8 | 13 +++++++++++-- > man/man8/ip.8 | 13 +++++++++++-- > man/man8/tc.8 | 13 +++++++++++-- > tc/tc.c | 3 +-- > 8 files changed, 77 insertions(+), 13 deletions(-) > LGTM. Reviewed-by: David Ahern