]> git.ipfire.org Git - thirdparty/systemd.git/commit
journalctl: add highlighting for matched substring 7881/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 27 Jan 2018 12:00:09 +0000 (13:00 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 28 Jan 2018 13:50:01 +0000 (14:50 +0100)
commitb4766d5f154c6645b73a81b706c1c43f6641a78a
tree38978f61016a1a61a5ddf953cf398261c7cabc92
parent61c5f8a1f06832a2bcad9ab75edfa4f652df2347
journalctl: add highlighting for matched substring

Red is used for highligting, the same as grep does. Except when the line is
highlighted red already, because it has high priority, in which case plain ansi
highlight is used for the matched substring.

Coloring is implemented for short and cat outputs, and not for other types.
I guess we could also add it for verbose output in the future.
src/basic/string-util.c
src/basic/string-util.h
src/journal-remote/journal-gatewayd.c
src/journal/journalctl.c
src/shared/logs-show.c
src/shared/logs-show.h
src/test/test-strip-tab-ansi.c