Skip to content

[FR] Smart Headers, similar to Smart Columns (column-width mode) #841

@ninetailedtori

Description

@ninetailedtori

It would be cool to have something that could reasonably guess what's the initial header, columnated material, what's a possible "section header", etc.

Possible test cases here are things such as man pages, which I can show you how it renders currently without intelligence, and manual statement of variables.

As described, I'd like the software to detect the top 6 lines should be "header", and thus declare it as such. I'd then like the lines numbered 1 and 6 in this, to read as section headers. We can see they differ in style, whether things such as a colon followed by a newline, or just that it doesn't abide by the columnation of the other lines. And then, the columns as follows: "-x, --long-x, desc" should be properly handled, because currently it's not intelligent enough to divide them. I've tested with both ColumnWidth: true, and ColumnDelimiter: '/\s{4,}/'

This is with manual passing of arg -H6:

Image

This is without anything set, just my logical config, which has a boring -H3 because it works for the majority of logs and output scripts, but I'd like to be able to set it to -1 to auto-detect:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions