-
Notifications
You must be signed in to change notification settings - Fork 419
Closed
Labels
Description
gum table
has various width bugs
Width is calculated on header only
% gum table <<< "a,b" <<< "1111111111111111111111111,222222222222222222222222"
a b
… …
Since a table has aligned data, gum already needs to read the whole input. Why does gum only use the header text to determine the width of cells by default? It could use the max width of each text column, (perhaps conditionnally to fit the terminal). But the default is not very good.
cell.width
still truncates cell text
% gum table <<< "a,b" <<< "1111111111111111111111111,222222222222222222222222" --cell.width=20
a b
… …
why does gum print …
though there are ~20 empty space characters that could display the 11111…
and 22222…
?
cell.width
does not affect header
% gum table <<< "a,b" <<< "1111111111111111111111111,222222222222222222222222" --cell.width=20
a b
… …
resulting in broken alignment between cells and header
Desktop (please complete the following information):
- OS: debian
- Version https://github.com/charmbracelet/gum/releases/tag/v0.9.0