-
Daniel Gröber (dxld) authored
Currently usageInfo lays out the cmdline help as three columns for each OptDescr: 1) the short options, 2) the long option and 3) the help text. We try to fit these columns in 79 chars but if thi fails we allocate at least 30 chars to the help text. Since we currently have some very long .. long options in cabal-install this makes the help output quite ugly on a standard 80x24 terminal window. This patch does two things: firstly we get rid of the dedicated short options column, and simply merge this with the long options column. Secondly instead of laying everything out in a strictly two column fashion with the first column having variable width we instead make the first column a fixed width and simply break the line after the list of options if we go over. Say we currently have: -a --short-long-option with some help text --really-long-option=with|a|bunch|of|allowed|values and help text here Instead we now get: -a, --short-long-option with some help text --really-long-option=with|a|bunch|of|allowed|values and help text here where the help text is aligned to a fixed column (30 chars here) throughout and we use a comma to separate the short and long options instead of giving the short options a dedicated column.
97e4a127