[docs] flesh out faq and mention JSON-lines matching

pull/1170/head v0.11.2-rc3
Tim Stack 12 months ago
parent 0e4a6635e1
commit f3b78e79b5

@ -1,4 +1,3 @@
.. _faq:
Frequently Asked Questions
@ -7,10 +6,18 @@ Frequently Asked Questions
Q: How can I copy & paste without decorations?
----------------------------------------------
:Answer: There are a few ways to do this:
:Answer: There are a couple ways to do this:
* Use the :ref:`bookmark<hotkeys_bookmarks>` hotkeys to mark lines and then
press :kbd:`c` to copy to the local system keyboard.
press :kbd:`c` to copy to the local system keyboard. The system clipboard
is accessed using commands like :code:`pbcopy` and :code:`xclip`. See the
:ref:`tuning` section for more details.
If a system clipboard is not available,
the `OSC 52 <https://www.reddit.com/r/vim/comments/k1ydpn/a_guide_on_how_to_copy_text_from_anywhere/>`_
terminal escape sequence will be tried. If your terminal supports this
escape sequence, the selected text will be copied to the clipboard, even
if you are on an SSH connection.
* Press :kbd:`CTRL` + :kbd:`l` to temporarily switch to "lo-fi"
mode where the contents of the current view are printed to the terminal.

@ -550,5 +550,10 @@ log file for the "Format order" message:
lnav -d /tmp/lnav.log
For JSON-lines log files, the log message must have the timestamp property
specified in the format in order to match. If multiple formats match a
message, the format that has the most matching :code:`line-format` elements
will win.
.. [#] The maximum number of lines to check can be configured. See the
:ref:`tuning` section for more details.

@ -187,7 +187,7 @@ Bookmarks
* - Keypress
- Command
* - :kbd:`m`
- Mark/unmark the top line
- Mark/unmark the top line or focused line when in cursor mode
* - :kbd:`Shift` + :kbd:`m`
- Mark/unmark the range of lines from the last marked to the top
* - :kbd:`Shift` + :kbd:`j`

Binary file not shown.

After

Width:  |  Height:  |  Size: 901 KiB

@ -1,4 +1,3 @@
.. _sql-ext:
SQLite Interface
@ -140,19 +139,20 @@ Commands
A SQL command is an internal macro implemented by lnav.
* .schema - Open the schema view. This view contains a dump of the schema
for the internal tables and any tables in attached databases.
* .msgformats - Executes a canned query that groups and counts log messages by
the format of their message bodies. This command can be useful for quickly
finding out the types of messages that are most common in a log file.
* :code:`.schema` - Open the schema view. This view contains a dump of the
schema for the internal tables and any tables in attached databases.
* :code:`.msgformats` - Executes a canned query that groups and counts log
messages by the format of their message bodies. This command can be useful
for quickly finding out the types of messages that are most common in a log
file.
Variables
---------
The following variables are available in SQL statements:
* $LINES - The number of lines in the terminal window.
* $COLS - The number of columns in the terminal window.
* :code:`$LINES` - The number of lines in the terminal window.
* :code:`$COLS` - The number of columns in the terminal window.
Environment
-----------

@ -134,11 +134,15 @@ available in this table:
:top_time: The timestamp of the top line in the view or NULL if the view is
not time-based. This value can be UPDATEd to move the view to the given
time.
:top_file: The file the top line in the view is from.
:paused: Indicates if the view is paused and will not load new data.
:search: The search string for this view. This value can be UPDATEd to
initiate a text search in this view.
:filtering: Indicates if the view is applying filters.
:movement: The movement mode, either 'top' or 'cursor'.
:top_meta: A JSON object that contains metadata related to the top line
in the view.
:selection: The number of the line that is focused for selection.
lnav_views_echo
---------------

@ -50,7 +50,7 @@ The top status bar shows the current time and messages stored in the
:ref:`table_lnav_user_notifications` table.
Below the top status bar is the breadcrumb bar that displays the semantic
location of the top line in the main view. For example, within a
location of the focused line in the main view. For example, within a
pretty-printed JSON document, it will show the path to property at the top
of the view. The actual content of the bar depends on the current view and
will be updated as you navigate around the main view. The bar can also be
@ -134,7 +134,7 @@ Bottom Status Bar
The second to last line is the bottom status bar, which shows the following:
* the line number of the top line, starting from zero;
* the line number of the focused line, starting from zero;
* the location within the view, as a percentage;
* the current search hit, the total number of hits, and the search term;
* the loading indicator.
@ -211,10 +211,10 @@ time will show the full path.
The breadcrumb bar will show the following crumbs:
* the timestamp for the top line;
* the log format for the top line;
* the name of the file the top line was pulled from;
* the "operation ID" of the top log message, if it is supported by the log
* the timestamp for the focused line;
* the log format for the focused line;
* the name of the file the focused line was pulled from;
* the "operation ID" of the focused log message, if it is supported by the log
format.
These crumbs are interactive and can be used to navigate to different parts
@ -236,6 +236,12 @@ Markdown
Files with an :code:`.md` (or :code:`.markdown`) extension will be treated as
Markdown files and rendered separately.
.. figure:: lnav-markdown-example.png
:align: center
Viewing the **lnav** :file:`README.md` file.
DB
^^

Loading…
Cancel
Save