#7788 closed enhancement (fixed)
Improve trac-admin help display
| Reported by: | Owned by: | Remy Blank | |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.12 |
| Component: | admin/console | Version: | 0.11.1 |
| Severity: | normal | Keywords: | patch |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description
Help page is too long. Here is a minor patch that allows to filter help results and adds "help list" command.
> trac-admin help list component deploy help hotcopy initenv milestone permission priority resolution resync severity ticket ticket_type upgrade version wiki
> trac-admin help wiki
wiki list
-- List wiki pages
wiki remove <page>
-- Remove wiki page
wiki export <page> [file]
-- Export wiki page to file or stdout
wiki import <page> [file]
-- Import wiki page from file or stdin
wiki dump <directory>
-- Export all wiki pages to files named by title
wiki load <directory>
-- Import all wiki pages from directory
wiki upgrade
-- Upgrade default wiki pages to current version
Attachments (1)
Change History (6)
by , 17 years ago
| Attachment: | help.cmdlist.diff added |
|---|
comment:1 by , 17 years ago
| Milestone: | → 0.12 |
|---|
comment:2 by , 17 years ago
svn, mercurial, bzr - current version control systems all have more or less unified command-line interface. Some of them are even "overcommandlined" like bazaar. Perhaps we can tune Python's optparse for console help API.
I am not sure that extended usage is needed though. Unless help spans more than one page I would avoid having another command to type.
comment:4 by , 17 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
| Summary: | [patch] console admin help filter → Improve trac-admin help display |
An improved way of displaying help for trac-admin has been committed in [7681]. It implements the suggestion in comment:1.
trac-admin <env> helpshows a compact list of all commands, without their arguments.
trac-admin <env> help <cmd>shows a less compact form for the commands in the given group, and includes the command arguments.
trac-admin <env> help <cmd> <subcmd>shows a long form, for commands that have a detailed explanation. See for exampleinitenvormilestone dueas examples.



Nice.
I think we should eventually move in the direction of the Mercurial help, which is even nicer.
You'd have:
If you specify
trac-admin help wiki, you'd have something similar to what yourlistsubcommand does (i.e. only showing one-liner help for thewikisubcommands).And then, a more precise help will be given when the command is given in full:
This would give us the possibility to show the one-liner help in a more concise way, plus to have extended usage information.