darcs

Issue 2250 Badly aligned Subcommands for `darcs show --help`

Title Badly aligned Subcommands for `darcs show --help`
Priority Status resolved
Milestone Resolved in 2.10.0
Superseder Nosy List owst
Assigned To
Topics PatchIndex, UI

Created on 2012-10-03.09:54:51 by owst, last changed 2013-06-20.18:23:28 by noreply.

Messages
msg16195 (view) Author: owst Date: 2012-10-03.09:54:49
Running `darcs show --help` lists the subcommands, but the patch-index
commands are too wide for the allowed spacing:

    Subcommands:
      contents       Outputs a specific version of a file.
      files          Show version-controlled files in the working copy.
      index          Dump contents of working tree index.
      pristine       Dump contents of pristine cache.
      repo           Show repository summary information
      authors        List authors by patch count.
      tags           Show all tags in the repository.
      patch-index-allDump complete content of patch index.
      patch-index-filesDump current files registered in patch index.
      patch-index-status Report patch-index status
      patch-index-testTest patch-index

I traced this back, to this line in Darcs/UI/Commands.hs line ~209:
    usageHelper ((CommandData c):cs) = "  "++padSpaces (commandName c) 15 
        ++ chompNewline (commandDescription c)++"\n"++usageHelper cs

It looks like the padding is 15 spaces, regardless of the size of the
contents... I don't know much about how this can work, but couldn't we
use some sort of "elastic" tab which expands past 15 spaces if necessary?
msg16880 (view) Author: noreply Date: 2013-06-20.18:23:26
The following patch sent by bsrkaditya@gmail.com updated issue issue2250 with
status=resolved;resolvedin=2.10.0 HEAD

* Resolve issue2250: tabbing in usageHelper - pad by max length of command name 
Ignore-this: ba9f28736ff789f3b8af60d0f4133534
History
Date User Action Args
2012-10-03 09:54:51owstcreate
2012-10-03 09:55:14owstsettopic: + UI, PatchIndex
2013-02-04 12:05:58bsrkadityalinkpatch1017 issues
2013-06-20 18:23:28noreplysetstatus: unknown -> resolved
messages: + msg16880
resolvedin: 2.10.0