Re: [PATCH v5 2/2] sideband: highlight keywords in remote sideband output
- From
Han-Wen Nienhuys <hanwen@google.com>
- Date
- Aug 6, 2018, 17:46 UTC
- Message-ID
- <CAFQ2z_PX+H=Pa-0Uzuc7_YYze6D4_zqL0Bjuof2wev5h1=c-9Q@mail.gmail.com>
- In-Reply-To
- <xmqqbmafpg14.fsf@gitster-ct.c.googlers.com>
On Mon, Aug 6, 2018 at 7:21 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
> > + If set, keywords at the start of the line are highlighted. The > > + keywords are "error", "warning", "hint" and "success", and are > > + matched case-insensitively. Maybe set to `always`, `false` (or > > + `never`) or `auto` (or `true`). If unset, then the value of > > + `color.ui` is used (`auto` by default). > > Reads much better. > > I am still trying to find a concise way to help readers who saw a > line that begins with "Warnings: foo bar bla" and accept that it is > OK the early 7 chars are not painted. "... case-insensitively and > honoring word boundary" is the best I came up so far, but I am > afraid that is adding more words without hinting what I want to convey > strongly enough, so I am not going to suggest that (at least not yet). >
what do you think of the idea of requiring a colon explicitly? That would avoid spurious highlighting in case a keyword happens to be wrapped onto a line start.
--
Google Germany GmbH, Erika-Mann-Strasse 33, 80636 Munich
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Paul Manicle, Halimah DeLaine Prado