Skip to content

adapt Usage description to fit whole display #1

@DavidLeoni

Description

@DavidLeoni

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions