mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-18 00:45:47 +00:00
With --right-align-numeric, PPRINT data cells right-align but headers stayed left-aligned, so a header did not line up with its own column's data -- the original ask in #380. Now a header is right-aligned when every value in its column is numeric, for both non-barred and barred PPRINT output. Mixed columns keep left-aligned headers. For --omd-aligned, the raw header text of right-aligned columns is now right-justified too, matching how Markdown viewers render the ---: marker; this follows the same all-values-numeric per-column rule already used for the separator markers. Man-page regeneration also picks up previously-merged reorder help-text edits that had not been regenerated. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
a63ea57359
commit
de013dc35c
21 changed files with 142 additions and 50 deletions
|
|
@ -537,9 +537,10 @@ var PPRINTOnlyFlagSection = FlagSection{
|
|||
{
|
||||
name: "--right-align-numeric",
|
||||
help: "Right-justifies fields with numeric values for PPRINT output, leaving " +
|
||||
"other fields (and header lines) left-justified. Also applies to markdown " +
|
||||
"output, where numeric columns get right-alignment markers (`---:`) in the " +
|
||||
"header-separator line.",
|
||||
"other fields left-justified. Headers are right-justified over columns " +
|
||||
"whose values are all numeric, so that header and data share the same " +
|
||||
"alignment. Also applies to markdown output, where numeric columns get " +
|
||||
"right-alignment markers (`---:`) in the header-separator line.",
|
||||
parser: func(args []string, argc int, pargi *int, options *TOptions) {
|
||||
options.WriterOptions.RightAlignNumericOutput = true
|
||||
*pargi += 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue