From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <t.lamprecht@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id 067A2D666
 for <pbs-devel@lists.proxmox.com>; Thu,  1 Dec 2022 09:02:35 +0100 (CET)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id D7E4226417
 for <pbs-devel@lists.proxmox.com>; Thu,  1 Dec 2022 09:02:34 +0100 (CET)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS
 for <pbs-devel@lists.proxmox.com>; Thu,  1 Dec 2022 09:02:34 +0100 (CET)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 1A41C424B7
 for <pbs-devel@lists.proxmox.com>; Thu,  1 Dec 2022 09:02:34 +0100 (CET)
Message-ID: <9942b2ee-8e2d-c47c-a71a-b5ba30d12eba@proxmox.com>
Date: Thu, 1 Dec 2022 09:02:33 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:108.0) Gecko/20100101
 Thunderbird/108.0
Content-Language: en-GB
To: Lukas Wagner <l.wagner@proxmox.com>,
 Proxmox Backup Server development discussion <pbs-devel@lists.proxmox.com>
References: <20221129141730.740199-1-l.wagner@proxmox.com>
 <f20f1920-3852-3485-f0ab-3329ade3bdda@proxmox.com>
 <a01f791a-3f00-cbac-89f8-2072638cd7b1@proxmox.com>
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
In-Reply-To: <a01f791a-3f00-cbac-89f8-2072638cd7b1@proxmox.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.100 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 NICE_REPLY_A           -0.257 Looks like a legit reply (A)
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
Subject: Re: [pbs-devel] [PATCH proxmox-backup 0/2] debug cli: improve
 output, optionally compare file content for `diff archive`
X-BeenThere: pbs-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox Backup Server development discussion
 <pbs-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pbs-devel/>
List-Post: <mailto:pbs-devel@lists.proxmox.com>
List-Help: <mailto:pbs-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel>, 
 <mailto:pbs-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Thu, 01 Dec 2022 08:02:35 -0000

Am 01/12/2022 um 08:30 schrieb Lukas Wagner:
> 
> On 11/30/22 17:27, Thomas Lamprecht wrote:
>> nothing against this approach, but what about color coding?
>> (maybe additionally or as either/or?)
>>
> 
> That is already on my 'future improvements' list. My approach would probably
> be to leave the current output format as-is, and then add coloring on top
> as eye candy (on by default, disabled by flag/envvar or if stdout is not a tty)
> 
> 

Hmm, I could imagine that there might be some that would like to avoid a extra
* adding "noise" if I got all information from the color anyway, but can be always
improved later, if anybody requests it at all.

For the "should I color choice" the nicest and flexibel way that most CLI tools
adhere too is having tree level:

- always
- never
- auto (stdout on if tty)

As with "always" it allows one also for checking out bigger outputs in a pager with
color, e.g., by piping to `less -R`.