kubescape: Output table does not fit in my terminal
Describe the bug
I am running kubescape scan -v and the printed table is to wide for my termianl
Environment
OS: Mac, M1
Version: the version that Kubescape reports when you run kubescape version
Your current version is: v2.0.176
Steps To Reproduce
run kubescape scan -v
Expected behavior
A nice and readable table
Actual Behavior
A non-readable table
Additional context
The table should be rendered so it will match the default terminal width of 80 columns
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 23 (22 by maintainers)
@matthyx as promised an update about this topic. I’ve rewritten almost in full the tablewriter library in
github.com/fredbi/tablewriter. Besides a lot of refactoring (not fully complete yet) I’ve added the feature we are missing: self-adapting the table under a global width constraint. It also breaks words that are too long, but that’s still a bit ugly. I am currently testing the integration in the kubescape printers.Yes, perhaps this is a good lead. Rendering tables nicely is definitely not an easy task. The guys who did the LaTeX tabular macros were definitely giants! Let’s experiment for a while. I’ll keep you posted here with any findings.
@dwertent I have played a bit with the current table lib… wrapping is weird in its workings and I don’t have something satisfying for an 80 col terminal. Since the project is pretty outdated, I suggest trying a quick PoC with https://github.com/jedib0t/go-pretty/blob/main/table/README.md and see how far it goes? If you want I can work on that during breaks.