Add interactive filter/selection tool (#58)

This commit is contained in:
T.v.Dein
2025-08-28 21:08:28 +02:00
committed by GitHub
parent b1a2b3059e
commit 1976b4046e
11 changed files with 376 additions and 22 deletions

View File

@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "TABLIZER 1"
.TH TABLIZER 1 "2025-03-06" "1" "User Commands"
.TH TABLIZER 1 "2025-08-28" "1" "User Commands"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -158,6 +158,7 @@ tablizer \- Manipulate tabular output of other programs
\& \-F, \-\-filter field[!]=reg Filter given field with regex, can be used multiple times
\& \-T, \-\-transpose\-columns string Transpose the speficied columns (separated by ,)
\& \-R, \-\-regex\-transposer /from/to/ Apply /search/replace/ regexp to fields given in \-T
\& \-I, \-\-interactive Interactively filter and select rows
\&
\& Output Flags (mutually exclusive):
\& \-X, \-\-extended Enable extended output
@@ -349,6 +350,20 @@ These field filters can also be negated:
.Ve
.PP
If the option \fB\-v\fR is specified, the filtering is inverted.
.SS "\s-1INTERACTIVE FILTERING\s0"
.IX Subsection "INTERACTIVE FILTERING"
You can also use the interactive mode, enabled with \f(CW\*(C`\-I\*(C'\fR to filter
and select rows. This mode is complementary, that is, other filter
options are still being respected.
.PP
To enter e filter, hit \f(CW\*(C`/\*(C'\fR, enter a filter string and finish with
\&\f(CW\*(C`ENTER\*(C'\fR. Use \f(CW\*(C`SPACE\*(C'\fR to select/deselect rows, use \f(CW\*(C`a\*(C'\fR to select all
(visible) rows.
.PP
Commit your selection with \f(CW\*(C`q\*(C'\fR. The selected rows are being fed to
the requested output mode as usual. Abort with \f(CW\*(C`CTRL\-c\*(C'\fR, in which
case the results of the interactive mode are being ignored and all
rows are being fed to output.
.SS "\s-1COLUMNS\s0"
.IX Subsection "COLUMNS"
The parameter \fB\-c\fR can be used to specify, which columns to
@@ -615,6 +630,9 @@ Released under the \s-1MIT\s0 License, Copyright (c) 201 by Oleku Konko
.IP "yaml (gopkg.in/yaml.v3)" 4
.IX Item "yaml (gopkg.in/yaml.v3)"
Released under the \s-1MIT\s0 License, Copyright (c) 2006\-2011 Kirill Simonov
.IP "bubble-table (https://github.com/Evertras/bubble\-table)" 4
.IX Item "bubble-table (https://github.com/Evertras/bubble-table)"
Released under the \s-1MIT\s0 License, Copyright (c) 2022 Brandon Fulljames
.SH "AUTHORS"
.IX Header "AUTHORS"
Thomas von Dein \fBtom \s-1AT\s0 vondein \s-1DOT\s0 org\fR