Edgewall Software
Modify

Opened 16 years ago

Closed 16 years ago

Last modified 9 years ago

#7788 closed enhancement (fixed)

Improve trac-admin help display

Reported by: techtonik <techtonik@…> 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)

help.cmdlist.diff (1.2 KB ) - added by techtonik@… 16 years ago.

Download all attachments as: .zip

Change History (6)

by techtonik@…, 16 years ago

Attachment: help.cmdlist.diff added

comment:1 by Christian Boos, 16 years ago

Milestone: 0.12

Nice.

I think we should eventually move in the direction of the Mercurial help, which is even nicer.

You'd have:

$ trac-admin help
...
(full list of command with one-liner help)
...
wiki list     list wiki pages
wiki remove   remove wiki page
wiki export   export wiki page to file or stdout
wiki import   import wiki page from file or stdin
wiki dump     export all wiki pages to files named by title
wiki load     import all wiki pages from directory
wiki upgrade  upgrade default wiki pages to current version
...

If you specify trac-admin help wiki, you'd have something similar to what your list subcommand does (i.e. only showing one-liner help for the wiki subcommands).

And then, a more precise help will be given when the command is given in full:

$ trac-admin help wiki export
wiki export <page> [file]
   Export wiki page to file or stdout

   (put here extended help if needed)

This would give us the possibility to show the one-liner help in a more concise way, plus to have extended usage information.

comment:2 by techtonik@…, 16 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:3 by Remy Blank, 16 years ago

Owner: set to Remy Blank

I'll look at this within the work I do for #7770.

comment:4 by Remy Blank, 16 years ago

Resolution: fixed
Status: newclosed
Summary: [patch] console admin help filterImprove 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> help shows 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 example initenv or milestone due as examples.

comment:5 by Remy Blank, 16 years ago

#7789 has been closed as a duplicate.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Remy Blank.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Remy Blank to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.