mirror of
https://github.com/tstack/lnav.git
synced 2024-08-16 16:30:25 +03:00
[markdown] add support for github alerts
This commit is contained in:
parent
54b391e53f
commit
8d8467dfcb
@ -70,6 +70,7 @@ add_library(
|
||||
strnatcmp.h
|
||||
time_util.hh
|
||||
types.hh
|
||||
wcwidth9.h
|
||||
|
||||
../third-party/xxHash/xxhash.h
|
||||
../third-party/xxHash/xxhash.c
|
||||
|
@ -69,7 +69,8 @@ noinst_HEADERS = \
|
||||
string_util.hh \
|
||||
strnatcmp.h \
|
||||
time_util.hh \
|
||||
types.hh
|
||||
types.hh \
|
||||
wcwidth9.h
|
||||
|
||||
libbase_a_SOURCES = \
|
||||
ansi_scrubber.cc \
|
||||
|
@ -523,7 +523,7 @@ attr_line_t::erase(size_t pos, size_t len)
|
||||
attr_line_t&
|
||||
attr_line_t::pad_to(ssize_t size)
|
||||
{
|
||||
const auto curr_len = this->utf8_length_or_length();
|
||||
const auto curr_len = this->column_width();
|
||||
|
||||
if (curr_len < size) {
|
||||
this->append((size - curr_len), ' ');
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "fmt/ostream.h"
|
||||
#include "pcrepp/pcre2pp.hh"
|
||||
#include "ww898/cp_utf8.hpp"
|
||||
#include "xxHash/xxhash.h"
|
||||
@ -416,9 +417,14 @@ string_fragment::sub_cell_range(int cell_start, int cell_end) const
|
||||
cell_index += 1;
|
||||
} while (cell_index % 8);
|
||||
break;
|
||||
default:
|
||||
cell_index += wcwidth(read_res.unwrap());
|
||||
default: {
|
||||
auto wcw_res = wcwidth(read_res.unwrap());
|
||||
if (wcw_res < 0) {
|
||||
wcw_res = 1;
|
||||
}
|
||||
cell_index += wcw_res;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -456,9 +462,14 @@ string_fragment::column_width() const
|
||||
retval += 1;
|
||||
} while (retval % 8);
|
||||
break;
|
||||
default:
|
||||
retval += wcwidth(read_res.unwrap());
|
||||
default: {
|
||||
auto wcw_res = wcwidth(read_res.unwrap());
|
||||
if (wcw_res < 0) {
|
||||
wcw_res = 1;
|
||||
}
|
||||
retval += wcw_res;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -184,3 +184,17 @@ World!)");
|
||||
CHECK(all_sf2 == "Hello,\nWorld!");
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("string_fragment::column_width")
|
||||
{
|
||||
{
|
||||
const auto sf = string_fragment::from_const("Key(s)\n");
|
||||
|
||||
CHECK(7 == sf.column_width());
|
||||
}
|
||||
{
|
||||
const auto sf = string_fragment::from_const("\u26a0");
|
||||
|
||||
CHECK(1 == sf.column_width());
|
||||
}
|
||||
}
|
||||
|
@ -409,7 +409,9 @@ println(FILE* file, const attr_line_t& al)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else if (attr.sa_type == &VC_ROLE) {
|
||||
} else if (attr.sa_type == &VC_ROLE
|
||||
|| attr.sa_type == &VC_ROLE_FG)
|
||||
{
|
||||
auto saw = string_attr_wrapper<role_t>(&attr);
|
||||
auto role = saw.get();
|
||||
|
||||
@ -441,6 +443,9 @@ println(FILE* file, const attr_line_t& al)
|
||||
line_style |= fmt::emphasis::bold
|
||||
| fmt::fg(fmt::terminal_color::green);
|
||||
break;
|
||||
case role_t::VCR_FOOTNOTE_BORDER:
|
||||
line_style |= fmt::fg(fmt::terminal_color::blue);
|
||||
break;
|
||||
case role_t::VCR_INFO:
|
||||
case role_t::VCR_STATUS:
|
||||
line_style |= fmt::emphasis::bold
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "config.h"
|
||||
#include "is_utf8.hh"
|
||||
#include "lnav_log.hh"
|
||||
#include "wcwidth9.h"
|
||||
|
||||
void
|
||||
scrub_to_utf8(char* buffer, size_t length)
|
||||
@ -422,3 +423,9 @@ quote(string_fragment str)
|
||||
|
||||
} // namespace pcre2pp
|
||||
} // namespace lnav
|
||||
|
||||
int
|
||||
wcwidth(wchar_t wc)
|
||||
{
|
||||
return wcwidth9(wc);
|
||||
}
|
||||
|
1322
src/base/wcwidth9.h
Normal file
1322
src/base/wcwidth9.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -370,7 +370,7 @@ field_overlay_source::build_field_lines(const listview_curses& lv,
|
||||
al.append(":bar_chart:"_emoji).append(" ");
|
||||
break;
|
||||
}
|
||||
auto prefix_len = al.utf8_length_or_length();
|
||||
auto prefix_len = al.column_width();
|
||||
hl_range.lr_start = al.get_string().length();
|
||||
al.append(field_name);
|
||||
hl_range.lr_end = al.get_string().length();
|
||||
|
@ -35,6 +35,7 @@ logfmt_parser_test_LDADD = \
|
||||
liblogfmt.a \
|
||||
$(top_builddir)/src/base/libbase.a \
|
||||
$(top_builddir)/src/pcrepp/libpcrepp.a \
|
||||
$(top_builddir)/src/fmtlib/libcppfmt.a \
|
||||
$(top_builddir)/src/third-party/scnlib/src/libscnlib.a
|
||||
|
||||
TESTS = \
|
||||
|
@ -2321,7 +2321,8 @@ SELECT tbl_name FROM sqlite_master WHERE sql LIKE 'CREATE VIRTUAL TABLE%'
|
||||
|
||||
stmt.for_each_row<std::string>(
|
||||
[&tables_to_drop](auto table_name) {
|
||||
tables_to_drop.emplace_back(table_name);
|
||||
tables_to_drop.emplace_back(fmt::format(
|
||||
FMT_STRING("DROP TABLE {}"), table_name));
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ md2attr_line::flush_footnotes()
|
||||
|
||||
auto& block_text = this->ml_blocks.back();
|
||||
auto longest_foot = this->ml_footnotes
|
||||
| lnav::itertools::map(&attr_line_t::utf8_length_or_length)
|
||||
| lnav::itertools::map(&attr_line_t::column_width)
|
||||
| lnav::itertools::max(0);
|
||||
|
||||
block_text.append("\n");
|
||||
@ -292,12 +292,12 @@ md2attr_line::leave_block(const md4cpp::event_handler::block& bl)
|
||||
|
||||
auto code_lines = block_text.rtrim().split_lines();
|
||||
auto max_width = code_lines
|
||||
| lnav::itertools::map(&attr_line_t::utf8_length_or_length)
|
||||
| lnav::itertools::map(&attr_line_t::column_width)
|
||||
| lnav::itertools::max(0);
|
||||
attr_line_t padded_text;
|
||||
|
||||
for (auto& line : code_lines) {
|
||||
line.pad_to(std::max(max_width + 4, ssize_t{40}))
|
||||
line.pad_to(std::max(max_width + 4, size_t{40}))
|
||||
.with_attr_for_all(VC_ROLE.value(role_t::VCR_QUOTED_CODE));
|
||||
padded_text.append(lnav::string::attrs::preformatted(" "))
|
||||
.append("\u258c"_code_border)
|
||||
@ -309,23 +309,75 @@ md2attr_line::leave_block(const md4cpp::event_handler::block& bl)
|
||||
last_block.append("\n").append(padded_text);
|
||||
}
|
||||
} else if (bl.is<block_quote>()) {
|
||||
const static auto ALERT_TYPE = lnav::pcre2pp::code::from_const(
|
||||
R"(^\s*\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\])");
|
||||
|
||||
text_wrap_settings tws = {0, 60};
|
||||
attr_line_t wrapped_text;
|
||||
auto md = ALERT_TYPE.create_match_data();
|
||||
std::optional<role_t> border_role;
|
||||
|
||||
wrapped_text.append(block_text.rtrim(), &tws);
|
||||
block_text.rtrim();
|
||||
if (ALERT_TYPE.capture_from(block_text.al_string)
|
||||
.into(md)
|
||||
.matches()
|
||||
.ignore_error())
|
||||
{
|
||||
attr_line_t replacement;
|
||||
|
||||
if (md[1] == "NOTE") {
|
||||
replacement.append("\u24d8 Note\n"_footnote_border);
|
||||
border_role = role_t::VCR_FOOTNOTE_BORDER;
|
||||
} else if (md[1] == "TIP") {
|
||||
replacement.append(":bulb:"_emoji)
|
||||
.append(" Tip\n")
|
||||
.with_attr_for_all(VC_ROLE.value(role_t::VCR_OK));
|
||||
border_role = role_t::VCR_OK;
|
||||
} else if (md[1] == "IMPORTANT") {
|
||||
replacement.append(":star2:"_emoji)
|
||||
.append(" Important\n")
|
||||
.with_attr_for_all(VC_ROLE.value(role_t::VCR_INFO));
|
||||
border_role = role_t::VCR_INFO;
|
||||
} else if (md[1] == "WARNING") {
|
||||
replacement.append(":warning:"_emoji)
|
||||
.append(" Warning\n")
|
||||
.with_attr_for_all(VC_ROLE.value(role_t::VCR_WARNING));
|
||||
border_role = role_t::VCR_WARNING;
|
||||
} else if (md[1] == "CAUTION") {
|
||||
replacement.append(":small_red_triangle:"_emoji)
|
||||
.append(" Caution\n")
|
||||
.with_attr_for_all(VC_ROLE.value(role_t::VCR_ERROR));
|
||||
border_role = role_t::VCR_ERROR;
|
||||
} else {
|
||||
ensure(0);
|
||||
}
|
||||
block_text.erase(md[0]->sf_begin, md[0]->length());
|
||||
block_text.insert(0, replacement);
|
||||
}
|
||||
|
||||
wrapped_text.append(block_text, &tws);
|
||||
auto quoted_lines = wrapped_text.split_lines();
|
||||
auto max_width = quoted_lines
|
||||
| lnav::itertools::map(&attr_line_t::utf8_length_or_length)
|
||||
| lnav::itertools::map(&attr_line_t::column_width)
|
||||
| lnav::itertools::max(0);
|
||||
attr_line_t padded_text;
|
||||
|
||||
for (auto& line : quoted_lines) {
|
||||
line.pad_to(max_width + 1)
|
||||
.with_attr_for_all(VC_ROLE.value(role_t::VCR_QUOTED_TEXT));
|
||||
padded_text.append(" ")
|
||||
.append("\u258c"_quote_border)
|
||||
.append(line)
|
||||
.append("\n");
|
||||
padded_text.append(" ");
|
||||
auto start_index = padded_text.length();
|
||||
padded_text.append("\u258c"_quote_border);
|
||||
if (border_role) {
|
||||
padded_text.with_attr(string_attr{
|
||||
line_range{
|
||||
(int) start_index,
|
||||
(int) padded_text.length(),
|
||||
},
|
||||
VC_ROLE_FG.value(border_role.value()),
|
||||
});
|
||||
}
|
||||
padded_text.append(line).append("\n");
|
||||
}
|
||||
if (!padded_text.empty()) {
|
||||
padded_text.with_attr_for_all(SA_PREFORMATTED.value());
|
||||
@ -341,18 +393,19 @@ md2attr_line::leave_block(const md4cpp::event_handler::block& bl)
|
||||
block_text.append("\n");
|
||||
max_col_sizes.resize(table_detail->col_count);
|
||||
for (size_t lpc = 0; lpc < table_detail->col_count; lpc++) {
|
||||
if (lpc < tab.t_headers.size()) {
|
||||
max_col_sizes[lpc] = tab.t_headers[lpc].utf8_length_or_length();
|
||||
tab.t_headers[lpc].with_attr_for_all(
|
||||
VC_ROLE.value(role_t::VCR_TABLE_HEADER));
|
||||
if (lpc >= tab.t_headers.size()) {
|
||||
continue;
|
||||
}
|
||||
max_col_sizes[lpc] = tab.t_headers[lpc].column_width();
|
||||
tab.t_headers[lpc].with_attr_for_all(
|
||||
VC_ROLE.value(role_t::VCR_TABLE_HEADER));
|
||||
}
|
||||
for (const auto& row : tab.t_rows) {
|
||||
for (size_t lpc = 0; lpc < table_detail->col_count; lpc++) {
|
||||
if (lpc >= row.r_columns.size()) {
|
||||
continue;
|
||||
}
|
||||
auto col_len = row.r_columns[lpc].utf8_length_or_length();
|
||||
auto col_len = row.r_columns[lpc].column_width();
|
||||
if (col_len > max_col_sizes[lpc]) {
|
||||
max_col_sizes[lpc] = col_len;
|
||||
}
|
||||
@ -377,19 +430,17 @@ md2attr_line::leave_block(const md4cpp::event_handler::block& bl)
|
||||
}
|
||||
}
|
||||
for (size_t line_index = 0; line_index < max_cell_lines; line_index++) {
|
||||
size_t col = 0;
|
||||
for (const auto& cell : cells) {
|
||||
for (const auto& [col, cell] : lnav::itertools::enumerate(cells)) {
|
||||
block_text.append(" ");
|
||||
if (line_index < cell.cl_lines.size()) {
|
||||
block_text.append(cell.cl_lines[line_index]);
|
||||
block_text.append(
|
||||
col_sizes[col]
|
||||
- cell.cl_lines[line_index].utf8_length_or_length(),
|
||||
- cell.cl_lines[line_index].column_width(),
|
||||
' ');
|
||||
} else {
|
||||
block_text.append(col_sizes[col], ' ');
|
||||
}
|
||||
col += 1;
|
||||
}
|
||||
block_text.append("\n")
|
||||
.append(lnav::roles::table_border(
|
||||
@ -420,8 +471,7 @@ md2attr_line::leave_block(const md4cpp::event_handler::block& bl)
|
||||
if (col < col_sizes.size() - 1) {
|
||||
block_text.append(
|
||||
col_sizes[col]
|
||||
- cell.cl_lines[line_index]
|
||||
.utf8_length_or_length(),
|
||||
- cell.cl_lines[line_index].column_width(),
|
||||
' ');
|
||||
}
|
||||
} else if (col < col_sizes.size() - 1) {
|
||||
|
@ -70,7 +70,9 @@ const struct itimerval ui_periodic_timer::INTERVAL = {
|
||||
{0, std::chrono::duration_cast<std::chrono::microseconds>(350ms).count()},
|
||||
};
|
||||
|
||||
ui_periodic_timer::ui_periodic_timer() : upt_counter(0)
|
||||
ui_periodic_timer::
|
||||
ui_periodic_timer()
|
||||
: upt_counter(0)
|
||||
{
|
||||
struct sigaction sa;
|
||||
|
||||
@ -329,10 +331,14 @@ view_curses::mvwattrline(WINDOW* window,
|
||||
1 - (lpc - lpc_start));
|
||||
}
|
||||
auto wch = read_res.unwrap();
|
||||
char_index += wcwidth(wch);
|
||||
auto wcw_res = wcwidth(wch);
|
||||
if (wcw_res < 0) {
|
||||
wcw_res = 1;
|
||||
}
|
||||
char_index += wcw_res;
|
||||
if (lr_bytes.lr_end == -1 && char_index > lr_chars.lr_end) {
|
||||
lr_bytes.lr_end = exp_start_index;
|
||||
retval.mr_chars_out = char_index - wcwidth(wch);
|
||||
retval.mr_chars_out = char_index - wcw_res;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -631,7 +637,9 @@ view_colors::singleton()
|
||||
return s_vc;
|
||||
}
|
||||
|
||||
view_colors::view_colors() : vc_dyn_pairs(0)
|
||||
view_colors::
|
||||
view_colors()
|
||||
: vc_dyn_pairs(0)
|
||||
{
|
||||
size_t color_index = 0;
|
||||
for (int z = 0; z < 6; z++) {
|
||||
|
@ -429,7 +429,7 @@ can always use [37m[40m q [0m to pop the top view off of the stack.
|
||||
▌[1mNote[0m: The regular expression format used by lnav is ]8;;http://perldoc.perl.org/perlre.html\[4mPCRE[0m]8;;\[4m[1][0m
|
||||
▌(Perl-Compatible Regular Expressions).
|
||||
▌
|
||||
▌ ▌[1] - http://perldoc.perl.org/perlre.html
|
||||
▌ [34m▌[0m[1] - http://perldoc.perl.org/perlre.html
|
||||
▌
|
||||
▌If the search string is not valid PCRE, a search is done for
|
||||
▌the exact string instead of doing a regex search.
|
||||
@ -584,7 +584,7 @@ interactively compared to SQL. For example, lnav can provide previews
|
||||
of different stages of the pipeline and provide more accurate
|
||||
tab-completions for the columns in the result set.
|
||||
|
||||
▌[1] - https://prql-lang.org
|
||||
[34m▌[0m[1] - https://prql-lang.org
|
||||
|
||||
You can execute a PRQL query in the SQL prompt. A PRQL query starts
|
||||
with the [37m[40m from [0m keyword that specifies the table to use as a data
|
||||
@ -593,7 +593,7 @@ symbol ([37m[40m | [0m) followed by a ]8;;https://prql-lang.org/book/referen
|
||||
in the prompt, lnav will display any relevant help and preview for the
|
||||
current and previous stages of the pipeline.
|
||||
|
||||
▌[1] - https://prql-lang.org/book/reference/stdlib/transforms/index.html
|
||||
[34m▌[0m[1] - https://prql-lang.org/book/reference/stdlib/transforms/index.html
|
||||
|
||||
Using the top ten URLs query from earlier as an example, the PRQL
|
||||
version would be as follows:
|
||||
|
@ -15,4 +15,4 @@ Run [37m[40m ./autogen.sh [0m if compiling from a cloned repository.
|
||||
command-line. If you're familiar with the SumoLogic query language,
|
||||
you might find this tool more comfortable to work with.
|
||||
|
||||
▌[1] - https://github.com/rcoh/angle-grinder
|
||||
[34m▌[0m[1] - https://github.com/rcoh/angle-grinder
|
||||
|
@ -1,23 +1,23 @@
|
||||
]8;;https://github.com/tstack/lnav/actions?query=workflow%3Aci-build\[4m🖼 Build[1][0m]8;;\[4m[2][0m ]8;;https://docs.lnav.org\[4m🖼 Docs[3][0m]8;;\[4m[4][0m ]8;;https://coveralls.io/github/tstack/lnav?branch=master\[4m🖼 Coverage Status[5][0m]8;;\[4m[6][0m ]8;;https://snapcraft.io/lnav\[4m🖼 lnav[7][0m]8;;\[4m[8][0m
|
||||
|
||||
▌[1] - https://github.com/tstack/lnav/workflows/ci-build/badge.svg
|
||||
▌[2] - https://github.com/tstack/lnav/actions?query=workflow%3Aci-build
|
||||
▌[3] - https://readthedocs.org/projects/lnav/badge/?version=latest&style=plastic
|
||||
▌[4] - https://docs.lnav.org
|
||||
▌[5] - https://coveralls.io/repos/github/tstack/lnav/badge.svg?branch=master
|
||||
▌[6] - https://coveralls.io/github/tstack/lnav?branch=master
|
||||
▌[7] - https://snapcraft.io/lnav/badge.svg
|
||||
▌[8] - https://snapcraft.io/lnav
|
||||
[34m▌[0m[1] - https://github.com/tstack/lnav/workflows/ci-build/badge.svg
|
||||
[34m▌[0m[2] - https://github.com/tstack/lnav/actions?query=workflow%3Aci-build
|
||||
[34m▌[0m[3] - https://readthedocs.org/projects/lnav/badge/?version=latest&style=plastic
|
||||
[34m▌[0m[4] - https://docs.lnav.org
|
||||
[34m▌[0m[5] - https://coveralls.io/repos/github/tstack/lnav/badge.svg?branch=master
|
||||
[34m▌[0m[6] - https://coveralls.io/github/tstack/lnav?branch=master
|
||||
[34m▌[0m[7] - https://snapcraft.io/lnav/badge.svg
|
||||
[34m▌[0m[8] - https://snapcraft.io/lnav
|
||||
|
||||
]8;;https://discord.gg/erBPnKwz7R\[4m🖼 [0m]8;;\]8;;https://discord.gg/erBPnKwz7R\[4mDiscord Logo[0m]8;;\]8;;https://discord.gg/erBPnKwz7R\[4m[1][0m]8;;\[4m[2][0m
|
||||
|
||||
▌[1] - https://assets-global.website-files.com/6257adef93867e50d84d30e2/62594fddd654fc29fcc07359_cb48d2a8d4991281d7a6a95d2f58195e.svg
|
||||
▌[2] - https://discord.gg/erBPnKwz7R
|
||||
[34m▌[0m[1] - https://assets-global.website-files.com/6257adef93867e50d84d30e2/62594fddd654fc29fcc07359_cb48d2a8d4991281d7a6a95d2f58195e.svg
|
||||
[34m▌[0m[2] - https://discord.gg/erBPnKwz7R
|
||||
|
||||
[4mThis is the source repository for [0m[1m[4mlnav[0m[4m, visit [0m]8;;https://lnav.org\[4mhttps://lnav.org[0m]8;;\[4m[1][0m[4m for[0m
|
||||
[4ma high level overview.[0m
|
||||
|
||||
▌[1] - https://lnav.org
|
||||
[34m▌[0m[1] - https://lnav.org
|
||||
|
||||
[1m[35mLNAV – The Logfile Navigator[0m
|
||||
|
||||
@ -32,7 +32,7 @@ set of files/directories, [1mlnav[0m will:
|
||||
[33m•[0m build an index of errors and warnings;
|
||||
[33m•[0m ]8;;https://docs.lnav.org/en/latest/formats.html#json-lines\[4mpretty-print JSON-lines[0m]8;;\[4m[1][0m.
|
||||
|
||||
▌[1] - https://docs.lnav.org/en/latest/formats.html#json-lines
|
||||
[34m▌[0m[1] - https://docs.lnav.org/en/latest/formats.html#json-lines
|
||||
|
||||
Then, in the [1mlnav[0m TUI, you can:
|
||||
|
||||
@ -46,14 +46,14 @@ Then, in the [1mlnav[0m TUI, you can:
|
||||
[33m•[0m view a histogram of messages over time (]8;;https://docs.lnav.org/en/latest/ui.html#hist\[4mpress [0m]8;;\]8;;https://docs.lnav.org/en/latest/ui.html#hist\[4m[37m[40m i [0m]8;;\[4m[7][0m);
|
||||
[33m•[0m query messages using SQLite (]8;;https://docs.lnav.org/en/latest/sqlext.html\[4mpress [0m]8;;\]8;;https://docs.lnav.org/en/latest/sqlext.html\[4m[37m[40m ; [0m]8;;\[4m[8][0m)
|
||||
|
||||
▌[1] - https://docs.lnav.org/en/latest/hotkeys.html#spatial-navigation
|
||||
▌[2] - https://docs.lnav.org/en/latest/hotkeys.html#spatial-navigation
|
||||
▌[3] - https://docs.lnav.org/en/latest/commands.html#highlight-pattern
|
||||
▌[4] - https://docs.lnav.org/en/latest/usage.html#regular-expression-match
|
||||
▌[5] - https://docs.lnav.org/en/latest/usage.html#sqlite-expression
|
||||
▌[6] - https://docs.lnav.org/en/latest/ui.html#pretty
|
||||
▌[7] - https://docs.lnav.org/en/latest/ui.html#hist
|
||||
▌[8] - https://docs.lnav.org/en/latest/sqlext.html
|
||||
[34m▌[0m[1] - https://docs.lnav.org/en/latest/hotkeys.html#spatial-navigation
|
||||
[34m▌[0m[2] - https://docs.lnav.org/en/latest/hotkeys.html#spatial-navigation
|
||||
[34m▌[0m[3] - https://docs.lnav.org/en/latest/commands.html#highlight-pattern
|
||||
[34m▌[0m[4] - https://docs.lnav.org/en/latest/usage.html#regular-expression-match
|
||||
[34m▌[0m[5] - https://docs.lnav.org/en/latest/usage.html#sqlite-expression
|
||||
[34m▌[0m[6] - https://docs.lnav.org/en/latest/ui.html#pretty
|
||||
[34m▌[0m[7] - https://docs.lnav.org/en/latest/ui.html#hist
|
||||
[34m▌[0m[8] - https://docs.lnav.org/en/latest/sqlext.html
|
||||
|
||||
[1mScreenshot[0m
|
||||
|
||||
@ -63,8 +63,8 @@ address and PIDs are semantically highlighted.
|
||||
|
||||
]8;;docs/assets/images/lnav-front-page.png\[4m🖼 Screenshot[1][0m]8;;\[4m[2][0m
|
||||
|
||||
▌[1] - file://{top_srcdir}/docs/assets/images/lnav-front-page.png
|
||||
▌[2] - file://{top_srcdir}/docs/assets/images/lnav-front-page.png
|
||||
[34m▌[0m[1] - file://{top_srcdir}/docs/assets/images/lnav-front-page.png
|
||||
[34m▌[0m[2] - file://{top_srcdir}/docs/assets/images/lnav-front-page.png
|
||||
|
||||
[1mWhy not [0m[1mjust[0m[1m use [0m[1m[37m[40m tail [0m[1m/[0m[1m[37m[40m grep [0m[1m/[0m[1m[37m[40m less [0m[1m?[0m
|
||||
|
||||
@ -85,21 +85,21 @@ example:
|
||||
|
||||
]8;;ssh://playground@demo.lnav.org\[4m[37m[40m $ ssh playground@demo.lnav.org [0m]8;;\[4m[1][0m
|
||||
|
||||
▌[1] - ssh://playground@demo.lnav.org
|
||||
[34m▌[0m[1] - ssh://playground@demo.lnav.org
|
||||
|
||||
The [35m"tutorial 1"[0m account is an interactive tutorial that can teach you
|
||||
the basics of operation:
|
||||
|
||||
]8;;ssh://tutorial1@demo.lnav.org\[4m[37m[40m $ ssh tutorial1@demo.lnav.org [0m]8;;\[4m[1][0m
|
||||
|
||||
▌[1] - ssh://tutorial1@demo.lnav.org
|
||||
[34m▌[0m[1] - ssh://tutorial1@demo.lnav.org
|
||||
|
||||
[1mInstallation[0m
|
||||
|
||||
]8;;https://github.com/tstack/lnav/releases/latest#release-artifacts\[4mDownload a statically-linked binary for Linux/MacOS from the release[0m]8;;\
|
||||
]8;;https://github.com/tstack/lnav/releases/latest#release-artifacts\[4mpage[0m]8;;\[4m[1][0m
|
||||
|
||||
▌[1] - https://github.com/tstack/lnav/releases/latest#release-artifacts
|
||||
[34m▌[0m[1] - https://github.com/tstack/lnav/releases/latest#release-artifacts
|
||||
|
||||
[4mBrew on MacOS[0m
|
||||
|
||||
@ -121,7 +121,7 @@ the view (arrow keys or [37m[40m j [0m/[37m[40m k [0m/[37m[40m h [0m/[
|
||||
See the ]8;;https://docs.lnav.org/en/latest/usage.html\[4mUsage section[0m]8;;\[4m[1][0m of the online documentation for more
|
||||
information.
|
||||
|
||||
▌[1] - https://docs.lnav.org/en/latest/usage.html
|
||||
[34m▌[0m[1] - https://docs.lnav.org/en/latest/usage.html
|
||||
|
||||
[^1]: Files that do not contain log messages can be seen in the TEXT
|
||||
view (reachable by pressing [37m[40m t [0m).
|
||||
@ -177,9 +177,9 @@ The following alternatives are also available:
|
||||
[33m•[0m ]8;;https://discord.gg/erBPnKwz7R\[4mDiscord[0m]8;;\[4m[2][0m
|
||||
[33m•[0m ]8;;https://groups.google.com/g/lnav\[4mGoogle Groups[0m]8;;\[4m[3][0m
|
||||
|
||||
▌[1] - mailto:support@lnav.org
|
||||
▌[2] - https://discord.gg/erBPnKwz7R
|
||||
▌[3] - https://groups.google.com/g/lnav
|
||||
[34m▌[0m[1] - mailto:support@lnav.org
|
||||
[34m▌[0m[2] - https://discord.gg/erBPnKwz7R
|
||||
[34m▌[0m[3] - https://groups.google.com/g/lnav
|
||||
|
||||
[1mLinks[0m
|
||||
|
||||
@ -187,15 +187,15 @@ The following alternatives are also available:
|
||||
[33m•[0m ]8;;https://docs.lnav.org\[1m[4mDocumentation[0m]8;;\[4m[2][0m on Read the Docs
|
||||
[33m•[0m ]8;;ARCHITECTURE.md\[4mInternal Architecture[0m]8;;\[4m[3][0m
|
||||
|
||||
▌[1] - https://lnav.org
|
||||
▌[2] - https://docs.lnav.org
|
||||
▌[3] - file://{top_srcdir}/ARCHITECTURE.md
|
||||
[34m▌[0m[1] - https://lnav.org
|
||||
[34m▌[0m[2] - https://docs.lnav.org
|
||||
[34m▌[0m[3] - file://{top_srcdir}/ARCHITECTURE.md
|
||||
|
||||
[1mContributing[0m
|
||||
|
||||
[33m•[0m ]8;;https://github.com/sponsors/tstack\[4mBecome a Sponsor on GitHub[0m]8;;\[4m[1][0m
|
||||
|
||||
▌[1] - https://github.com/sponsors/tstack
|
||||
[34m▌[0m[1] - https://github.com/sponsors/tstack
|
||||
|
||||
[4mBuilding From Source[0m
|
||||
|
||||
@ -238,4 +238,4 @@ Run [37m[40m ./autogen.sh [0m if compiling from a cloned repository.
|
||||
command-line. If you're familiar with the SumoLogic query language,
|
||||
you might find this tool more comfortable to work with.
|
||||
|
||||
▌[1] - https://github.com/rcoh/angle-grinder
|
||||
[34m▌[0m[1] - https://github.com/rcoh/angle-grinder
|
||||
|
@ -6,8 +6,8 @@ address and PIDs are semantically highlighted.
|
||||
|
||||
]8;;docs/assets/images/lnav-front-page.png\[4m🖼 Screenshot[1][0m]8;;\[4m[2][0m
|
||||
|
||||
▌[1] - file://{top_srcdir}/docs/assets/images/lnav-front-page.png
|
||||
▌[2] - file://{top_srcdir}/docs/assets/images/lnav-front-page.png
|
||||
[34m▌[0m[1] - file://{top_srcdir}/docs/assets/images/lnav-front-page.png
|
||||
[34m▌[0m[2] - file://{top_srcdir}/docs/assets/images/lnav-front-page.png
|
||||
|
||||
[1mWhy not [0m[1mjust[0m[1m use [0m[1m[37m[40m tail [0m[1m/[0m[1m[37m[40m grep [0m[1m/[0m[1m[37m[40m less [0m[1m?[0m
|
||||
|
||||
@ -28,21 +28,21 @@ example:
|
||||
|
||||
]8;;ssh://playground@demo.lnav.org\[4m[37m[40m $ ssh playground@demo.lnav.org [0m]8;;\[4m[1][0m
|
||||
|
||||
▌[1] - ssh://playground@demo.lnav.org
|
||||
[34m▌[0m[1] - ssh://playground@demo.lnav.org
|
||||
|
||||
The [35m"tutorial 1"[0m account is an interactive tutorial that can teach you
|
||||
the basics of operation:
|
||||
|
||||
]8;;ssh://tutorial1@demo.lnav.org\[4m[37m[40m $ ssh tutorial1@demo.lnav.org [0m]8;;\[4m[1][0m
|
||||
|
||||
▌[1] - ssh://tutorial1@demo.lnav.org
|
||||
[34m▌[0m[1] - ssh://tutorial1@demo.lnav.org
|
||||
|
||||
[1mInstallation[0m
|
||||
|
||||
]8;;https://github.com/tstack/lnav/releases/latest#release-artifacts\[4mDownload a statically-linked binary for Linux/MacOS from the release[0m]8;;\
|
||||
]8;;https://github.com/tstack/lnav/releases/latest#release-artifacts\[4mpage[0m]8;;\[4m[1][0m
|
||||
|
||||
▌[1] - https://github.com/tstack/lnav/releases/latest#release-artifacts
|
||||
[34m▌[0m[1] - https://github.com/tstack/lnav/releases/latest#release-artifacts
|
||||
|
||||
[4mBrew on MacOS[0m
|
||||
|
||||
@ -64,7 +64,7 @@ the view (arrow keys or [37m[40m j [0m/[37m[40m k [0m/[37m[40m h [0m/[
|
||||
See the ]8;;https://docs.lnav.org/en/latest/usage.html\[4mUsage section[0m]8;;\[4m[1][0m of the online documentation for more
|
||||
information.
|
||||
|
||||
▌[1] - https://docs.lnav.org/en/latest/usage.html
|
||||
[34m▌[0m[1] - https://docs.lnav.org/en/latest/usage.html
|
||||
|
||||
[^1]: Files that do not contain log messages can be seen in the TEXT
|
||||
view (reachable by pressing [37m[40m t [0m).
|
||||
@ -120,9 +120,9 @@ The following alternatives are also available:
|
||||
[33m•[0m ]8;;https://discord.gg/erBPnKwz7R\[4mDiscord[0m]8;;\[4m[2][0m
|
||||
[33m•[0m ]8;;https://groups.google.com/g/lnav\[4mGoogle Groups[0m]8;;\[4m[3][0m
|
||||
|
||||
▌[1] - mailto:support@lnav.org
|
||||
▌[2] - https://discord.gg/erBPnKwz7R
|
||||
▌[3] - https://groups.google.com/g/lnav
|
||||
[34m▌[0m[1] - mailto:support@lnav.org
|
||||
[34m▌[0m[2] - https://discord.gg/erBPnKwz7R
|
||||
[34m▌[0m[3] - https://groups.google.com/g/lnav
|
||||
|
||||
[1mLinks[0m
|
||||
|
||||
@ -130,15 +130,15 @@ The following alternatives are also available:
|
||||
[33m•[0m ]8;;https://docs.lnav.org\[1m[4mDocumentation[0m]8;;\[4m[2][0m on Read the Docs
|
||||
[33m•[0m ]8;;ARCHITECTURE.md\[4mInternal Architecture[0m]8;;\[4m[3][0m
|
||||
|
||||
▌[1] - https://lnav.org
|
||||
▌[2] - https://docs.lnav.org
|
||||
▌[3] - file://{top_srcdir}/ARCHITECTURE.md
|
||||
[34m▌[0m[1] - https://lnav.org
|
||||
[34m▌[0m[2] - https://docs.lnav.org
|
||||
[34m▌[0m[3] - file://{top_srcdir}/ARCHITECTURE.md
|
||||
|
||||
[1mContributing[0m
|
||||
|
||||
[33m•[0m ]8;;https://github.com/sponsors/tstack\[4mBecome a Sponsor on GitHub[0m]8;;\[4m[1][0m
|
||||
|
||||
▌[1] - https://github.com/sponsors/tstack
|
||||
[34m▌[0m[1] - https://github.com/sponsors/tstack
|
||||
|
||||
[4mBuilding From Source[0m
|
||||
|
||||
@ -181,4 +181,4 @@ Run [37m[40m ./autogen.sh [0m if compiling from a cloned repository.
|
||||
command-line. If you're familiar with the SumoLogic query language,
|
||||
you might find this tool more comfortable to work with.
|
||||
|
||||
▌[1] - https://github.com/rcoh/angle-grinder
|
||||
[34m▌[0m[1] - https://github.com/rcoh/angle-grinder
|
||||
|
@ -1,4 +1,4 @@
|
||||
command-line. If you're familiar with the SumoLogic query language,
|
||||
you might find this tool more comfortable to work with.
|
||||
|
||||
▌[1] - https://github.com/rcoh/angle-grinder
|
||||
[34m▌[0m[1] - https://github.com/rcoh/angle-grinder
|
||||
|
@ -9,8 +9,8 @@
|
||||
|
||||
🖼 ]8;;file://{top_srcdir}/docs/lnav-architecture.png\The internal architecture of lnav]8;;\[2]
|
||||
|
||||
▌[1] - file://{top_srcdir}/docs/lnav-tui.png
|
||||
▌[2] - file://{top_srcdir}/docs/lnav-architecture.png
|
||||
[34m▌[0m[1] - file://{top_srcdir}/docs/lnav-tui.png
|
||||
[34m▌[0m[2] - file://{top_srcdir}/docs/lnav-architecture.png
|
||||
|
||||
[1m[31mBold red[0m
|
||||
|
||||
@ -49,3 +49,20 @@ Goodbye, [36m▌[0mWorld[32m╏[0m!
|
||||
▌[37m[40m <author>Finnegan</author> [0m
|
||||
▌[37m[40m </book> [0m
|
||||
▌[37m[40m</books> [0m
|
||||
|
||||
[34m▌[0m[34mⓘ Note[0m
|
||||
[34m▌[0mUseful information that users should know, even when
|
||||
[34m▌[0mskimming content.
|
||||
|
||||
[1m[32m▌[0m[1m[32m💡 Tip[0m
|
||||
[1m[32m▌[0mHelpful advice for doing things better or more easily.
|
||||
|
||||
[1m[35m▌[0m[1m[35m🌟 Important[0m
|
||||
[1m[35m▌[0mKey information users need to know to achieve their goal.
|
||||
|
||||
[33m▌[0m[33m⚠️ Warning[0m
|
||||
[33m▌[0mUrgent info that needs immediate user attention to avoid
|
||||
[33m▌[0mproblems.
|
||||
|
||||
[1m[31m▌[0m[1m[31m🔺 Caution[0m
|
||||
[1m[31m▌[0mAdvises about risks or negative outcomes of certain actions.
|
||||
|
@ -6,8 +6,8 @@ address and PIDs are semantically highlighted.
|
||||
|
||||
]8;;docs/assets/images/lnav-front-page.png\[4m🖼 Screenshot[1][0m]8;;\[4m[2][0m
|
||||
|
||||
▌[1] - file://{top_srcdir}/docs/assets/images/lnav-front-page.png
|
||||
▌[2] - file://{top_srcdir}/docs/assets/images/lnav-front-page.png
|
||||
[34m▌[0m[1] - file://{top_srcdir}/docs/assets/images/lnav-front-page.png
|
||||
[34m▌[0m[2] - file://{top_srcdir}/docs/assets/images/lnav-front-page.png
|
||||
|
||||
[1mWhy not [0m[1mjust[0m[1m use [0m[1m[37m[40m tail [0m[1m/[0m[1m[37m[40m grep [0m[1m/[0m[1m[37m[40m less [0m[1m?[0m
|
||||
|
||||
@ -28,21 +28,21 @@ example:
|
||||
|
||||
]8;;ssh://playground@demo.lnav.org\[4m[37m[40m $ ssh playground@demo.lnav.org [0m]8;;\[4m[1][0m
|
||||
|
||||
▌[1] - ssh://playground@demo.lnav.org
|
||||
[34m▌[0m[1] - ssh://playground@demo.lnav.org
|
||||
|
||||
The [35m"tutorial 1"[0m account is an interactive tutorial that can teach you
|
||||
the basics of operation:
|
||||
|
||||
]8;;ssh://tutorial1@demo.lnav.org\[4m[37m[40m $ ssh tutorial1@demo.lnav.org [0m]8;;\[4m[1][0m
|
||||
|
||||
▌[1] - ssh://tutorial1@demo.lnav.org
|
||||
[34m▌[0m[1] - ssh://tutorial1@demo.lnav.org
|
||||
|
||||
[1mInstallation[0m
|
||||
|
||||
]8;;https://github.com/tstack/lnav/releases/latest#release-artifacts\[4mDownload a statically-linked binary for Linux/MacOS from the release[0m]8;;\
|
||||
]8;;https://github.com/tstack/lnav/releases/latest#release-artifacts\[4mpage[0m]8;;\[4m[1][0m
|
||||
|
||||
▌[1] - https://github.com/tstack/lnav/releases/latest#release-artifacts
|
||||
[34m▌[0m[1] - https://github.com/tstack/lnav/releases/latest#release-artifacts
|
||||
|
||||
[4mBrew on MacOS[0m
|
||||
|
||||
@ -64,7 +64,7 @@ the view (arrow keys or [37m[40m j [0m/[37m[40m k [0m/[37m[40m h [0m/[
|
||||
See the ]8;;https://docs.lnav.org/en/latest/usage.html\[4mUsage section[0m]8;;\[4m[1][0m of the online documentation for more
|
||||
information.
|
||||
|
||||
▌[1] - https://docs.lnav.org/en/latest/usage.html
|
||||
[34m▌[0m[1] - https://docs.lnav.org/en/latest/usage.html
|
||||
|
||||
[^1]: Files that do not contain log messages can be seen in the TEXT
|
||||
view (reachable by pressing [37m[40m t [0m).
|
||||
@ -120,9 +120,9 @@ The following alternatives are also available:
|
||||
[33m•[0m ]8;;https://discord.gg/erBPnKwz7R\[4mDiscord[0m]8;;\[4m[2][0m
|
||||
[33m•[0m ]8;;https://groups.google.com/g/lnav\[4mGoogle Groups[0m]8;;\[4m[3][0m
|
||||
|
||||
▌[1] - mailto:support@lnav.org
|
||||
▌[2] - https://discord.gg/erBPnKwz7R
|
||||
▌[3] - https://groups.google.com/g/lnav
|
||||
[34m▌[0m[1] - mailto:support@lnav.org
|
||||
[34m▌[0m[2] - https://discord.gg/erBPnKwz7R
|
||||
[34m▌[0m[3] - https://groups.google.com/g/lnav
|
||||
|
||||
[1mLinks[0m
|
||||
|
||||
@ -130,15 +130,15 @@ The following alternatives are also available:
|
||||
[33m•[0m ]8;;https://docs.lnav.org\[1m[4mDocumentation[0m]8;;\[4m[2][0m on Read the Docs
|
||||
[33m•[0m ]8;;ARCHITECTURE.md\[4mInternal Architecture[0m]8;;\[4m[3][0m
|
||||
|
||||
▌[1] - https://lnav.org
|
||||
▌[2] - https://docs.lnav.org
|
||||
▌[3] - file://{top_srcdir}/ARCHITECTURE.md
|
||||
[34m▌[0m[1] - https://lnav.org
|
||||
[34m▌[0m[2] - https://docs.lnav.org
|
||||
[34m▌[0m[3] - file://{top_srcdir}/ARCHITECTURE.md
|
||||
|
||||
[1mContributing[0m
|
||||
|
||||
[33m•[0m ]8;;https://github.com/sponsors/tstack\[4mBecome a Sponsor on GitHub[0m]8;;\[4m[1][0m
|
||||
|
||||
▌[1] - https://github.com/sponsors/tstack
|
||||
[34m▌[0m[1] - https://github.com/sponsors/tstack
|
||||
|
||||
[4mBuilding From Source[0m
|
||||
|
||||
@ -181,4 +181,4 @@ Run [37m[40m ./autogen.sh [0m if compiling from a cloned repository.
|
||||
command-line. If you're familiar with the SumoLogic query language,
|
||||
you might find this tool more comfortable to work with.
|
||||
|
||||
▌[1] - https://github.com/rcoh/angle-grinder
|
||||
[34m▌[0m[1] - https://github.com/rcoh/angle-grinder
|
||||
|
@ -58,3 +58,18 @@ def hw(name):
|
||||
</book>
|
||||
</books>
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> Useful information that users should know, even when skimming content.
|
||||
|
||||
> [!TIP]
|
||||
> Helpful advice for doing things better or more easily.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> Key information users need to know to achieve their goal.
|
||||
|
||||
> [!WARNING]
|
||||
> Urgent info that needs immediate user attention to avoid problems.
|
||||
|
||||
> [!CAUTION]
|
||||
> Advises about risks or negative outcomes of certain actions.
|
||||
|
Loading…
Reference in New Issue
Block a user