ov icon indicating copy to clipboard operation
ov copied to clipboard

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

Open ninetailedtori opened this issue 4 months ago • 1 comments

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

ninetailedtori avatar Sep 02 '25 00:09 ninetailedtori

Thank you for your suggestion.

Automatic detection of headers and sections is interesting, but it’s a bit tricky to implement well. I’m still considering the best approach, including possibly using AI in the future. I appreciate your feedback.

noborus avatar Sep 03 '25 21:09 noborus