Closed jszwedko closed 9 years ago
Comment from other PR:
This is a little too much logic in ERB for my taste. I would prefer for this to live in the formatter class.
Do you mean, pass the commands into the formatter and have it return the maximum length?
Sort of... I was thinking the formatter could define methods that would be available in the context where the help template gets rendered. However, now that I've revisited the formatter code I realize that'll be a little messy since it just renders using the binding of the runner. So I think this is good to go as-is. :+1:
Thanks for reopening!
Ah dang, didn't realize Travis wasn't building PRs. Looks like this introduced a test failure: https://travis-ci.org/commander-rb/commander/jobs/57127299
By using the longest command and alias names to determine how much to "indent" the descriptions.
Re-opened from https://github.com/tj/commander/issues/98