From: Dragan Simic Date: Sun, 09 Jun 2024 07:57:20 GMT Subject: Re: [PATCH v3 0/6] use the pager in 'add -p' Message-ID: <7937845d7cb7ae0179c4922ed154c5c7@manjaro.org> In-Reply-To: <219a195c-74d0-4c21-bf54-0752bb5b01df@gmail.com> Hello Ruben, On 2024-06-09 09:44, Rubén Justo wrote: > Some concerns were raised about controlling when to send coloring > escape > sequences. Several ideas were discussed to address this, including > introducing a new command ">", a modifier for "|": "||", and others. > Alternatively, we could leave it up to the user to filter as needed. > Or, simply, do not send escape codes at all. > > So, looking back at the ideas discussed in the thread, perhaps a > reasonable next step might be to reintroduce the 'P' command > and let '|' be the way to send raw, uncolored, chunks. Actually, it would be better to re-introduce the "P" option, without any parameters, which would display the current hunk through the already configured pager, and let "|" be the new option that pipes hunks _without_ coloring escape sequences to "". As a follow-up, after the dust settles, we could add ">" as another new option that pipes hunks _with_ the coloring escape sequences to "". That would be a rather clean approach, which would also reserve the "weird-looking" commands with additional parameters (i.e. "|" and ">") for the more advanced operations, while the "normal-looking" command (i.e. "P") would be assigned to the, presumably, most commonly used new hunk operation.