[darcs-devel] [issue2250] Badly aligned Subcommands for `darcs show --help`

Owen Stephens bugs at darcs.net
Wed Oct 3 09:54:51 UTC 2012


New submission from Owen Stephens <darcs at owenstephens.co.uk>:

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?

----------
messages: 16195
nosy: owst
status: unknown
title: Badly aligned Subcommands for `darcs show --help`

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue2250>
__________________________________


More information about the darcs-devel mailing list