git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Junio C Hamano
Message 9 of 9 in “sideband: highlight keywords in remote sideband output”
  1. 0/2 sideband: highlight keywords in remote sideband outputHan-Wen Nienhuys, Aug 6, 2018
  2. 1/2 config: document git config getter return valueHan-Wen Nienhuys, Aug 6, 2018
  3. Junio C HamanoAug 6, 2018
  4. Han-Wen NienhuysAug 6, 2018
  5. 2/2 sideband: highlight keywords in remote sideband outputHan-Wen Nienhuys, Aug 6, 2018
  6. Junio C HamanoAug 6, 2018
  7. Han-Wen NienhuysAug 6, 2018
  8. Junio C HamanoAug 6, 2018
  9. Han-Wen NienhuysAug 6, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.