Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0 columns does weird wrapping #17

Closed
marknelissen opened this issue May 15, 2017 · 2 comments
Closed

0 columns does weird wrapping #17

marknelissen opened this issue May 15, 2017 · 2 comments
Assignees
Labels

Comments

@marknelissen
Copy link

marknelissen commented May 15, 2017

When not setting the columns value, the help output is weirdly formatted, since it behaves as if you try to wrap with a very small value, instead of no wrap as the javadoc indicates.

Sample code

class Configuration(parser: ArgParser) {
    val test by parser.storing(help = "lol test")
    init {
        parser.force()
    }
}
fun main(args: Array<String>) = mainBody(columns = 0) {
    Configuration(ArgParser(args))
}

Output:

usage: 
        
        [
        -
        h
        ]
        
        -
        -
        t
        e
        s
        t
        
        T
        E
        S
        T

required arguments:
     
  -  l
  -  o
  t  l
  e  
  s  t
  t  e
     s
  T  t
  E
  S
  T


optional arguments:
     
  -  s
  h  h
  ,  o
     w
  -  
  -  t
  h  h
  e  i
  l  s
  p  
     h
     e
     l
     p
     
     m
     e
     s
     s
     a
     g
     e
     
     a
     n
     d
     
     e
     x
     i
     t

This has been obtained with kotlin 1.1.2-2 on jre 8.

@xenomachina xenomachina self-assigned this May 15, 2017
@xenomachina
Copy link
Owner

I can reproduce this. Thanks for reporting it.

@xenomachina
Copy link
Owner

Ok, this should be fixed in release 2.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants