cmd2 icon indicating copy to clipboard operation
cmd2 copied to clipboard

settables: calculate the maximum width of the "Value" column

Open gjvc opened this issue 8 months ago • 3 comments

When printing the table of settables, the "Value" column is limited to 30 characters, and the "Description" column to 60.

Calculate the maximum value of the "Value" column and use that value as the width, using the length of the title "Value" as a lower bound.

For the "Description" column, keep the current behaviour, though it really doesn't require a limit at the moment, being the rightmost column.

gjvc avatar May 18 '25 14:05 gjvc

@gjvc Feel free to submit a PR for this.

tleonhardt avatar May 23 '25 00:05 tleonhardt

From chatting with @kmvanbrunt , the issue described here is not limited to the settable table. We do it in the help table as well.

I think he has a thought on how to address this. I'll let him comment later.

tleonhardt avatar May 23 '25 01:05 tleonhardt

We will tackle this feature in in a 3.0 release, but doing so beforehand would be challenging. We need to replace some of our infrastructure first and doing so will ultimately involve some breaking changes.

tleonhardt avatar Jun 12 '25 21:06 tleonhardt