Uploaded image for project: 'Commons CLI'
  1. Commons CLI
  2. CLI-166

Terminal width detection

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • 1.3
    • Help formatter
    • None

    Description

      HelpFormatter could be improved by adjusting automatically its width to the width of the terminal. The width of the terminal can be retrieved by the stty command on unix systems, on Windows it requires a native call. The JLine project on SourceForge already implements this logic.

      http://jline.sourceforge.net

      I suggest to add a setAutoWidth(boolean) method in HelpFormatter that will try to get the terminal width. If it fails it'll fall back to the width provided by getWidth().

      Attachments

        Activity

          People

            jimjag Jim Jagielski
            ebourg Emmanuel Bourg
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: