cobra icon indicating copy to clipboard operation
cobra copied to clipboard

Wrapping `--help` output lines to 80 (or whatever) characters

Open farnasirim opened this issue 6 years ago • 4 comments

      --smtp-server-host string   SMTP server host address to use for sending emails. Default: smtp.gmail.com                                                            
      --smtp-to string            Address to send the diff email to. Defaults to smtp-user

I had a look around the code and figured that this is not supported. Was wondering if you would accept a patch.

This is not very trivial to do right now as the padding that comes before the command descriptions is dependent on the longest flag name + type and calculating the padding and repadding subsequent lines is cumbersome for the user.

Therefore I think it makes more sense to handle this inside cobra.

farnasirim avatar Jan 15 '19 14:01 farnasirim