journalctl: make matching optionally case sensitive

Case sensitive or case insensitive matching can be requested using
--case-sensitive[=yes|no].

Unless specified, matching is case sensitive if the pattern contains any
uppercase letters, and case insensitive otherwise. This matches what
forward-search does in emacs, and recently also --ignore-case in less.  This
works surprisingly well, because usually when one is wants to do case-sensitive
matching, the pattern is usually camel-cased. In the less frequent case when
case-sensitive matching is required with an all-lowercase pattern,
--case-sensitive can be used to override the automatic logic.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2018-01-28 14:50:01 +01:00
parent 6becf48ca3
commit 61c5f8a1f0
3 changed files with 131 additions and 75 deletions
-1
View File
@@ -500,7 +500,6 @@ tests += [
[],
'', 'manual'],
[['src/test/test-cgroup-mask.c',
'src/test/test-helper.c'],
[libcore,