Add fixed width support for pprint reader (#1999)

* Add fixed width support for pprint reader

* fix windows fail

* fix windows fail 2
This commit is contained in:
Balki 2026-03-01 16:25:17 +00:00 committed by GitHub
parent e9ec42abef
commit de31cb1fc8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 858 additions and 0 deletions

View file

@ -559,6 +559,26 @@ var PPRINTOnlyFlagSection = FlagSection{
*pargi += 1
},
},
{
name: "--fixed",
arg: "{string}",
help: "Fixed width specification. One of 'widths:<col1-width>,<col2-width>,...', left-align, left-align-multi-word, right-align, right-align-multi-word",
parser: func(args []string, argc int, pargi *int, options *TOptions) {
options.ReaderOptions.FixedWidthSpec = args[*pargi+1]
*pargi += 2
},
},
{
name: "--fw",
arg: "{string}",
help: "Shortcut for --fixed left-align-multi-word",
parser: func(args []string, argc int, pargi *int, options *TOptions) {
options.ReaderOptions.FixedWidthSpec = "left-align-multi-word"
*pargi += 1
},
},
},
}