tablewriter icon indicating copy to clipboard operation
tablewriter copied to clipboard

Option to disable white spaces in row start

Open alok87 opened this issue 5 years ago • 14 comments

https://github.com/olekukonko/tablewriter/issues/129

Before

$ cmdctl get products heimdall
  NAME      REPO
  heimdall  practo/heimdall

After

table.SetTrimRowStart(true)
$ cmdctl get products heimdall
NAME     REPO
heimdall practo/heimdall

kubectl prints like this (some users would want to keep the same convention)

alok87 avatar May 14 '19 16:05 alok87

@mattn what do you think?

olekukonko avatar Jun 07 '19 07:06 olekukonko

@alok87 please add test?

mattn avatar Jun 07 '19 07:06 mattn

@mattn looking at this critically, does it require a test?

olekukonko avatar Jun 07 '19 08:06 olekukonko

This is not a bug fix. So I hope to add test to not break this feature.

mattn avatar Jun 07 '19 12:06 mattn

looking forward for it getting merged

ppwfx avatar Jul 24 '19 10:07 ppwfx

@olekukonko Please merge and release this

woodcockjosh avatar Sep 29 '19 16:09 woodcockjosh

@alok87 I think this should just trim the row start and the row end. Can you please update to just be SetTablePadding(false) otherwise there will be spaces at the end still which matters when using awk

woodcockjosh avatar Sep 29 '19 16:09 woodcockjosh

@alok87 Are you still planning on completing this? If not I can open a PR to resolve https://github.com/olekukonko/tablewriter/issues/129

woodcockjosh avatar Oct 07 '19 12:10 woodcockjosh

Yes, but waiting for test.

mattn avatar Oct 07 '19 14:10 mattn

@woodcockjosh please go ahead and give PRs :)

alok87 avatar Oct 08 '19 08:10 alok87

I will try to work on this tomorrow

woodcockjosh avatar Oct 10 '19 12:10 woodcockjosh

I've raised PR #144 which includes a test

shreddedbacon avatar Nov 03 '19 07:11 shreddedbacon

@mattn we need to attend to all pending PR

olekukonko avatar Oct 21 '20 16:10 olekukonko

Please rebase from master branch.

mattn avatar Oct 21 '20 17:10 mattn