Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 110C3C43381 for ; Thu, 21 Feb 2019 15:04:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D51162083B for ; Thu, 21 Feb 2019 15:04:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726157AbfBUPEL (ORCPT ); Thu, 21 Feb 2019 10:04:11 -0500 Received: from mx2.suse.de ([195.135.220.15]:51892 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725385AbfBUPEL (ORCPT ); Thu, 21 Feb 2019 10:04:11 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 7DEA0AD9C; Thu, 21 Feb 2019 15:04:10 +0000 (UTC) From: Petr Vorel To: netdev@vger.kernel.org Cc: Petr Vorel , Stephen Hemminger Subject: [PATCH iproute2 1/1] man: Document COLORFGBG environment variable Date: Thu, 21 Feb 2019 16:04:01 +0100 Message-Id: <20190221150401.618-1-pvorel@suse.cz> X-Mailer: git-send-email 2.16.4 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Default colors are not contrast enough on dark backround and this functionality, which uses more suitable colors is hidden in the code. Signed-off-by: Petr Vorel --- man/man8/ip.8 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/man/man8/ip.8 b/man/man8/ip.8 index 84ade110..133d40d5 100644 --- a/man/man8/ip.8 +++ b/man/man8/ip.8 @@ -189,6 +189,12 @@ precedence. This flag is ignored if .B \-json is also given. +Used color palette can be influenced by +.BR COLORFGBG +environment variable +(see +.BR ENVIRONMENT ). + .TP .BR "\-t" , " \-timestamp" display current time when using monitor option. @@ -330,6 +336,17 @@ Usually it is or, if the objects of this class cannot be listed, .BR "help" . +.SH ENVIRONMENT +.TP +.B COLORFGBG +If set, it's value is used for detection whether background is dark or light and use contrast colors for it. + +COLORFGBG environment variable usually contains either two or three +values separated by semicolons; we want the last value in either case. +If this value is 0-6 or 8, chose colors suitable for dark background: + +COLORFGBG=";0" ip -c a + .SH EXIT STATUS Exit status is 0 if command was successful, and 1 if there is a syntax error. If an error was reported by the kernel exit status is 2. -- 2.12.3