#2496: trac-admin help is illegible due to long lines
------------------------------+---------------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: cboos
Type: defect | Status: closed
Priority: normal | Milestone: 0.10
Component: trac-admin | Version: 0.9.2
Severity: normal | Resolution: fixed
Keywords: |
------------------------------+---------------------------------------------
Comment (by cboos):
Readability? I found it was too compact.
Anyway, a better fix would be to have for each command a short and a
longer help.
The first line will be used in a compact, global, help.
The second will be used when asking for help on that specific command.
That's how Mercurial does it, and it's a good model, I think.
e.g. the global help:
{{{
$ hg help
Mercurial Distributed SCM
list of commands (use "hg help -v" to show aliases and global options):
add add the specified files on the next commit
annotate show changeset information per file line
archive create unversioned archive of a repository revision
backout reverse effect of earlier changeset
bundle create a changegroup file
cat output the latest or given revisions of files
clone make a copy of an existing repository
...
}}}
the specific help:
{{{
hg add [OPTION]... [FILE]...
add the specified files on the next commit
Schedule files to be version controlled and added to the repository.
The files will be added to the repository at the next commit.
If no names are given, add all files in the repository.
options:
-I --include include names matching the given patterns
-X --exclude exclude names matching the given patterns
}}}
and the corresponding bits of source code:
{{{
def add(ui, repo, *pats, **opts):
"""add the specified files on the next commit
Schedule files to be version controlled and added to the repository.
The files will be added to the repository at the next commit.
If no names are given, add all files in the repository.
"""
}}}
the options doc come from another data structure:
{{{
...
"^add":
(add,
[('I', 'include', [], _('include names matching the given
patterns')),
('X', 'exclude', [], _('exclude names matching the given
patterns'))],
_('hg add [OPTION]... [FILE]...')),
...
}}}
--
Ticket URL: <http://projects.edgewall.com/trac/ticket/2496>
The Trac Project <http://trac.edgewall.com/>
_______________________________________________
Trac-Tickets mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-tickets