This repository was archived by the owner on Dec 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +27
-2
lines changed
Expand file tree Collapse file tree 4 files changed +27
-2
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ import (
2828)
2929
3030const DefaultSeparator string = `(\s\s+|\t)`
31- const Version string = "v1.5.6 "
31+ const Version string = "v1.5.7 "
3232const MAXPARTS = 2
3333
3434var DefaultConfigfile = os .Getenv ("HOME" ) + "/.config/tablizer/config"
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import (
2020 "errors"
2121 "fmt"
2222 "os"
23+ "slices"
2324 "strings"
2425
2526 "github.com/spf13/cobra"
@@ -187,6 +188,11 @@ func Execute() {
187188
188189 rootCmd .SetUsageTemplate (strings .TrimSpace (usage ) + "\n " )
189190
191+ if slices .Contains (os .Args , "-h" ) {
192+ fmt .Println (shortusage )
193+ os .Exit (0 )
194+ }
195+
190196 err := rootCmd .Execute ()
191197 if err != nil {
192198 os .Exit (1 )
Original file line number Diff line number Diff line change 1+ package cmd
2+
3+ const shortusage = `tablizer [regex,...] [-r file] [flags]
4+ -c col,... show specified columns -L highlight matching lines
5+ -k col,... sort by specified columns -j read JSON input
6+ -F col=reg filter field with regexp -v invert match
7+ -T col,... transpose specified columns -n numberize columns
8+ -R /from/to/ apply replacement to columns in -T -N do not use colors
9+ -y col,... yank columns to clipboard -H do not show headers
10+ --ofs char output field separator -s specify field separator
11+ -r file read input from file -z use fuzzy search
12+ -f file read config from file -I interactive filter mode
13+ -d debug
14+ -O org -C CSV -M md -X ext -S shell -Y yaml -D sort descending order
15+ -m show manual --help show detailed help -v show version
16+ -a sort by age -i sort numerically -t sort by time`
Original file line number Diff line number Diff line change 11# usage
2- exec tablizer -h
2+ exec tablizer --help
33stdout Usage
44
5+ exec tablizer -h
6+ stdout show
7+
58# version
69exec tablizer -V
710stdout version
You can’t perform that action at this time.
0 commit comments