mirror of
https://codeberg.org/scip/tablizer.git
synced 2025-12-17 04:30:56 +01:00
release v1.0.16 (#8)
* add shortcut -H to --no-headers, it's too cumbersome to type * bump version * add -H to usage * re-generated --------- Co-authored-by: Thomas von Dein <tom@vondein.org>
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
releases
|
||||||
|
tablizer
|
||||||
@@ -19,13 +19,14 @@ package cfg
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/gookit/color"
|
|
||||||
"os"
|
"os"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
|
||||||
|
"github.com/gookit/color"
|
||||||
)
|
)
|
||||||
|
|
||||||
const DefaultSeparator string = `(\s\s+|\t)`
|
const DefaultSeparator string = `(\s\s+|\t)`
|
||||||
const Version string = "v1.0.15"
|
const Version string = "v1.0.16"
|
||||||
|
|
||||||
var VERSION string // maintained by -x
|
var VERSION string // maintained by -x
|
||||||
|
|
||||||
|
|||||||
@@ -20,13 +20,14 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/spf13/cobra"
|
|
||||||
"github.com/tlinden/tablizer/cfg"
|
|
||||||
"github.com/tlinden/tablizer/lib"
|
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/spf13/cobra"
|
||||||
|
"github.com/tlinden/tablizer/cfg"
|
||||||
|
"github.com/tlinden/tablizer/lib"
|
||||||
)
|
)
|
||||||
|
|
||||||
func man() {
|
func man() {
|
||||||
@@ -105,7 +106,7 @@ func Execute() {
|
|||||||
// options
|
// options
|
||||||
rootCmd.PersistentFlags().BoolVarP(&conf.Debug, "debug", "d", false, "Enable debugging")
|
rootCmd.PersistentFlags().BoolVarP(&conf.Debug, "debug", "d", false, "Enable debugging")
|
||||||
rootCmd.PersistentFlags().BoolVarP(&conf.NoNumbering, "no-numbering", "n", false, "Disable header numbering")
|
rootCmd.PersistentFlags().BoolVarP(&conf.NoNumbering, "no-numbering", "n", false, "Disable header numbering")
|
||||||
rootCmd.PersistentFlags().BoolVarP(&conf.NoHeaders, "no-headers", "", false, "Disable header display")
|
rootCmd.PersistentFlags().BoolVarP(&conf.NoHeaders, "no-headers", "H", false, "Disable header display")
|
||||||
rootCmd.PersistentFlags().BoolVarP(&conf.NoColor, "no-color", "N", false, "Disable pattern highlighting")
|
rootCmd.PersistentFlags().BoolVarP(&conf.NoColor, "no-color", "N", false, "Disable pattern highlighting")
|
||||||
rootCmd.PersistentFlags().BoolVarP(&ShowVersion, "version", "V", false, "Print program version")
|
rootCmd.PersistentFlags().BoolVarP(&ShowVersion, "version", "V", false, "Print program version")
|
||||||
rootCmd.PersistentFlags().BoolVarP(&conf.InvertMatch, "invert-match", "v", false, "select non-matching rows")
|
rootCmd.PersistentFlags().BoolVarP(&conf.InvertMatch, "invert-match", "v", false, "select non-matching rows")
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ SYNOPSIS
|
|||||||
-v, --invert-match select non-matching rows
|
-v, --invert-match select non-matching rows
|
||||||
-n, --no-numbering Disable header numbering
|
-n, --no-numbering Disable header numbering
|
||||||
-N, --no-color Disable pattern highlighting
|
-N, --no-color Disable pattern highlighting
|
||||||
--no-headers Disable headers display
|
-H, --no-headers Disable headers display
|
||||||
-s, --separator string Custom field separator
|
-s, --separator string Custom field separator
|
||||||
-k, --sort-by int Sort by column (default: 1)
|
-k, --sort-by int Sort by column (default: 1)
|
||||||
|
|
||||||
@@ -89,9 +89,9 @@ DESCRIPTION
|
|||||||
The numbering can be suppressed by using the -n option.
|
The numbering can be suppressed by using the -n option.
|
||||||
|
|
||||||
By default tablizer shows a header containing the names of each column.
|
By default tablizer shows a header containing the names of each column.
|
||||||
This can be disabled using the --no-headers option. Be aware that this
|
This can be disabled using the -H option. Be aware that this only
|
||||||
only affects tabular output modes. Shell, Extended, Yaml and CSV output
|
affects tabular output modes. Shell, Extended, Yaml and CSV output modes
|
||||||
modes always use the column names.
|
always use the column names.
|
||||||
|
|
||||||
By default, if a pattern has been speficied, matches will be
|
By default, if a pattern has been speficied, matches will be
|
||||||
highlighted. You can disable this behavior with the -N option.
|
highlighted. You can disable this behavior with the -N option.
|
||||||
@@ -299,7 +299,7 @@ Operational Flags:
|
|||||||
-v, --invert-match select non-matching rows
|
-v, --invert-match select non-matching rows
|
||||||
-n, --no-numbering Disable header numbering
|
-n, --no-numbering Disable header numbering
|
||||||
-N, --no-color Disable pattern highlighting
|
-N, --no-color Disable pattern highlighting
|
||||||
--no-headers Disable headers display
|
-H, --no-headers Disable headers display
|
||||||
-s, --separator string Custom field separator
|
-s, --separator string Custom field separator
|
||||||
-k, --sort-by int Sort by column (default: 1)
|
-k, --sort-by int Sort by column (default: 1)
|
||||||
|
|
||||||
|
|||||||
10
tablizer.1
10
tablizer.1
@@ -133,7 +133,7 @@
|
|||||||
.\" ========================================================================
|
.\" ========================================================================
|
||||||
.\"
|
.\"
|
||||||
.IX Title "TABLIZER 1"
|
.IX Title "TABLIZER 1"
|
||||||
.TH TABLIZER 1 "2023-04-21" "1" "User Commands"
|
.TH TABLIZER 1 "2023-05-03" "1" "User Commands"
|
||||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||||
.\" way too many mistakes in technical documents.
|
.\" way too many mistakes in technical documents.
|
||||||
.if n .ad l
|
.if n .ad l
|
||||||
@@ -151,7 +151,7 @@ tablizer \- Manipulate tabular output of other programs
|
|||||||
\& \-v, \-\-invert\-match select non\-matching rows
|
\& \-v, \-\-invert\-match select non\-matching rows
|
||||||
\& \-n, \-\-no\-numbering Disable header numbering
|
\& \-n, \-\-no\-numbering Disable header numbering
|
||||||
\& \-N, \-\-no\-color Disable pattern highlighting
|
\& \-N, \-\-no\-color Disable pattern highlighting
|
||||||
\& \-\-no\-headers Disable headers display
|
\& \-H, \-\-no\-headers Disable headers display
|
||||||
\& \-s, \-\-separator string Custom field separator
|
\& \-s, \-\-separator string Custom field separator
|
||||||
\& \-k, \-\-sort\-by int Sort by column (default: 1)
|
\& \-k, \-\-sort\-by int Sort by column (default: 1)
|
||||||
\&
|
\&
|
||||||
@@ -236,9 +236,9 @@ the original order.
|
|||||||
The numbering can be suppressed by using the \fB\-n\fR option.
|
The numbering can be suppressed by using the \fB\-n\fR option.
|
||||||
.PP
|
.PP
|
||||||
By default tablizer shows a header containing the names of each
|
By default tablizer shows a header containing the names of each
|
||||||
column. This can be disabled using the \fB\-\-no\-headers\fR option. Be
|
column. This can be disabled using the \fB\-H\fR option. Be aware that
|
||||||
aware that this only affects tabular output modes. Shell, Extended,
|
this only affects tabular output modes. Shell, Extended, Yaml and \s-1CSV\s0
|
||||||
Yaml and \s-1CSV\s0 output modes always use the column names.
|
output modes always use the column names.
|
||||||
.PP
|
.PP
|
||||||
By default, if a \fBpattern\fR has been speficied, matches will be
|
By default, if a \fBpattern\fR has been speficied, matches will be
|
||||||
highlighted. You can disable this behavior with the \fB\-N\fR option.
|
highlighted. You can disable this behavior with the \fB\-N\fR option.
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ tablizer - Manipulate tabular output of other programs
|
|||||||
-v, --invert-match select non-matching rows
|
-v, --invert-match select non-matching rows
|
||||||
-n, --no-numbering Disable header numbering
|
-n, --no-numbering Disable header numbering
|
||||||
-N, --no-color Disable pattern highlighting
|
-N, --no-color Disable pattern highlighting
|
||||||
--no-headers Disable headers display
|
-H, --no-headers Disable headers display
|
||||||
-s, --separator string Custom field separator
|
-s, --separator string Custom field separator
|
||||||
-k, --sort-by int Sort by column (default: 1)
|
-k, --sort-by int Sort by column (default: 1)
|
||||||
|
|
||||||
@@ -92,9 +92,9 @@ the original order.
|
|||||||
The numbering can be suppressed by using the B<-n> option.
|
The numbering can be suppressed by using the B<-n> option.
|
||||||
|
|
||||||
By default tablizer shows a header containing the names of each
|
By default tablizer shows a header containing the names of each
|
||||||
column. This can be disabled using the B<--no-headers> option. Be
|
column. This can be disabled using the B<-H> option. Be aware that
|
||||||
aware that this only affects tabular output modes. Shell, Extended,
|
this only affects tabular output modes. Shell, Extended, Yaml and CSV
|
||||||
Yaml and CSV output modes always use the column names.
|
output modes always use the column names.
|
||||||
|
|
||||||
By default, if a B<pattern> has been speficied, matches will be
|
By default, if a B<pattern> has been speficied, matches will be
|
||||||
highlighted. You can disable this behavior with the B<-N> option.
|
highlighted. You can disable this behavior with the B<-N> option.
|
||||||
|
|||||||
Reference in New Issue
Block a user