Skip to content

Commit 3ddaa32

Browse files
committed
Merge branch 'master' into develop
2 parents 53066b5 + 1694119 commit 3ddaa32

42 files changed

Lines changed: 1159 additions & 253 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

NEWS.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Features:
6969
* The DB view now shows a status bar above the bottom
7070
status bar with the SQL query that populated the view,
7171
the relative time when it was run, and how long it took.
72-
A reload icon at the left side of the bar can be clicked
72+
A reload icon on the left side of the bar can be clicked
7373
to re-run the query. For queries that read from log-backed
7474
tables, the status bar also calls out whether the results
7575
are "on current log data" or "on old log data" relative to
@@ -84,8 +84,29 @@ Features:
8484
- `⌘-X` to cut the current selection to the
8585
clipboard.
8686
- `⌘-Z` to undo the last change.
87+
* Additional readline-style key bindings in the
88+
prompt (issue #1676):
89+
- `ALT-f` / `ALT-b` move forward/backward by word.
90+
- `ALT-d` cuts to the end of the next word.
91+
- `ALT-BACKSPACE` is an alias for `CTRL-W`.
92+
- `ALT-l` / `ALT-u` lower- or upper-case the
93+
next word.
94+
- `ALT-c` capitalizes the next word.
95+
- `CTRL-h` and `CTRL-d` are aliases for
96+
BACKSPACE and DELETE.
97+
- `CTRL-t` transposes the two characters before
98+
the cursor.
99+
* In the log message details (opened by pressing `p`),
100+
a `File:` row has been added that lists the file and
101+
line number the log message is from. Also, for JSON
102+
logs, you can focus on the `JSON fields:` row and
103+
press `c` to copy the raw log message to the
104+
clipboard.
87105
* The `measure_with_units` collator now recognizes
88106
(KiB, MiB, ...).
107+
* Added `disfavors` to `external-editor` configuration
108+
to express file names that the editor is not interested
109+
in handling.
89110

90111
Breaking changes:
91112
* The `humanize_file_size()` SQLite function now
@@ -98,6 +119,8 @@ Bug Fixes:
98119
read and crash in some situations.
99120
* Fix a lockup when viewing a file that contained log
100121
messages and lots of binary data.
122+
* Update Regex101 import functionality to handle a
123+
change in their API response.
101124
* More hardening for some diabolical inputs:
102125
- Unsupported escape-sequences were ignored before,
103126
but they are displayed now.

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ however, they do not understand log messages. Tail can watch
4747
multiple files at a time, but it won't display messages in order by
4848
time and you can't scroll backwards. Grep will only find matching
4949
lines, but won't return a full multi-line log message. Less can only
50-
display a single file at a time. Also, none of these basic tools
50+
display a single file at a time. Also, none of these basic tools
5151
handle compressed files.
5252

5353
## Try online before installing
@@ -59,7 +59,7 @@ an example:
5959

6060
[`$ ssh playground@demo.lnav.org`](ssh://playground@demo.lnav.org)
6161

62-
The "tutorial 1" account is an interactive tutorial that can teach
62+
The "tutorial 1" account is an interactive tutorial that can teach
6363
you the basics of operation:
6464

6565
[`$ ssh tutorial1@demo.lnav.org`](ssh://tutorial1@demo.lnav.org)
@@ -89,17 +89,17 @@ monitor, it will figure out the rest:
8989
$ lnav /path/to/file1 /path/to/dir ...
9090
```
9191

92-
The **lnav** TUI will pop up right away and begin indexing the
93-
files. Progress is displayed in the "Files" panel at the
94-
bottom. Once the indexing has finished, the LOG view will display
95-
the log messages that were recognized[^1]. You can then use the
92+
The **lnav** TUI will pop up right away and begin indexing the
93+
files. Progress is displayed in the "Files" panel at the
94+
bottom. Once the indexing has finished, the LOG view will display
95+
the log messages that were recognized[^1]. You can then use the
9696
usual hotkeys to move around the view (arrow keys or
9797
`j`/`k`/`h`/`l` to move down/up/left/right).
9898

9999
See the [Usage section](https://docs.lnav.org/en/latest/usage.html)
100100
of the online documentation for more information.
101101

102-
[^1]: Files that do not contain log messages can be seen in the
102+
[^1]: Files that do not contain log messages can be seen in the
103103
TEXT view (reachable by pressing `t`).
104104

105105
### Usage with `systemd-journald`

docs/schemas/config-v1.schema.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,15 @@
325325
},
326326
"prefers": {
327327
"title": "/tuning/external-editor/impls/<editor_impl_name>/prefers",
328+
"description": "Regular expression that matches file names preferred by this editor",
329+
"type": "string",
330+
"examples": [
331+
"^.*(?:\\.cpp)$"
332+
]
333+
},
334+
"disfavors": {
335+
"title": "/tuning/external-editor/impls/<editor_impl_name>/disfavors",
336+
"description": "Regular expression that matches file names not favored by this editor",
328337
"type": "string",
329338
"examples": [
330339
"^.*(?:\\.cpp)$"

docs/source/hotkeys.rst

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,12 @@ editing:
393393
* - :kbd:`Shift` + :kbd:``
394394
-
395395
- Move right one character and include it in the selection
396+
* - :kbd:`Alt` + :kbd:``
397+
- :kbd:`Alt` + :kbd:`b`
398+
- Move to the start of the previous word
399+
* - :kbd:`Alt` + :kbd:``
400+
- :kbd:`Alt` + :kbd:`f`
401+
- Move to the start of the next word
396402
* - :kbd:``
397403
- :kbd:`Ctrl` + :kbd:`P`
398404
- In single-line mode, search the history with the current contents.
@@ -408,15 +414,30 @@ editing:
408414
* - :kbd:`Ctrl` + :kbd:`E`
409415
-
410416
- Move to the end of the line
417+
* - :kbd:`Ctrl` + :kbd:`T`
418+
-
419+
- Transpose the two characters before the cursor
420+
* - :kbd:`Alt` + :kbd:`l`
421+
-
422+
- Convert the next word to lower-case and move to the end of it
423+
* - :kbd:`Alt` + :kbd:`u`
424+
-
425+
- Convert the next word to upper-case and move to the end of it
426+
* - :kbd:`Alt` + :kbd:`c`
427+
-
428+
- Capitalize the next word and move to the end of it
411429
* - :kbd:`Ctrl` + :kbd:`K`
412430
-
413431
- Cut to the end of the line into the clipboard
414432
* - :kbd:`Ctrl` + :kbd:`U`
415433
-
416434
- Cut from the beginning of the line to the cursor into the clipboard
417435
* - :kbd:`Ctrl` + :kbd:`W`
418-
-
436+
- :kbd:`Alt` + :kbd:`Backspace`
419437
- Cut from the beginning of the previous word into the clipboard
438+
* - :kbd:`Alt` + :kbd:`d`
439+
-
440+
- Cut to the end of the next word into the clipboard
420441
* - :kbd:`Ctrl` + :kbd:`Y`
421442
-
422443
- Paste the clipboard contents

src/base/ansi_scrubber.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ scrub_ansi_string(std::string& str, string_attrs_t* sa)
329329
lr.lr_end = cp_dst;
330330
tmp_sa.emplace_back(
331331
lr,
332-
SA_UNSUPPORTED.value(fmt::format(
332+
SAT_UNSUPPORTED.value(fmt::format(
333333
FMT_STRING("ANSI sequence: OSC {} {}"),
334334
md[3],
335335
md[4])));
@@ -497,7 +497,7 @@ scrub_ansi_string(std::string& str, string_attrs_t* sa)
497497
lr.lr_end = cp_dst;
498498
tmp_sa.emplace_back(
499499
lr,
500-
SA_UNSUPPORTED.value(fmt::format(
500+
SAT_UNSUPPORTED.value(fmt::format(
501501
FMT_STRING("ANSI sequence: ESC [ {} {}"),
502502
seq,
503503
terminator)));

0 commit comments

Comments
 (0)