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

adapt Usage description to fit whole display #1

Open
DavidLeoni opened this issue Jun 27, 2016 · 0 comments
Open

adapt Usage description to fit whole display #1

DavidLeoni opened this issue Jun 27, 2016 · 0 comments

Comments

@DavidLeoni
Copy link
Member

Unfortunately jCommander doesn't adapt usage text to console width. To get console width jLine2 library can be used:

            terminalWidth = jline.TerminalFactory.get().getWidth();
            jcom.setColumnSize(terminalWidth);

but JCommander.setColumnSize() constrains only usage but not options, i.e.:

    import-xml      Imports into the db lexical resources in UBY-LMF XML format.
      Usage: import-xml [options] a space separated list of XML files in UBY-LMF format. Lexical resources must have a 'name' attribute. If there are already present resources with the same name, content will be merged.
        Options:
        * --author, -a
             The author of the operations on the db.
             Default: <empty string>
        * --description, -d
             The description of the operation being performed on the db.
             Default: <empty string>
          --skip-augment, -s
             Skips augmenting the db graph to speed up  operations requiring the
             transitive closure.
             Default: false

Also doesn't allow to

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

No branches or pull requests

1 participant