Ticket #1072 (assigned enhancement)

Opened 2 years ago

Last modified 1 month ago

Add a "tg-admin help" command

Reported by: tlesher Assigned to: elvelind (accepted)
Priority: normal Milestone: 1.5
Component: tg-admin (non-toolbox) Version: 0.9a6
Severity: minor Keywords:
Cc:

Description

For utilities that take a command argument (like tg-admin, cvs, or svn), it's customary to give general help with no arguments ("tg-admin") or a help argument ("tg-admin help"), and to give specific command help for "tg-admin help <command>".

Right now, in order to get help for a specific command, you need to append the "-h" flag to the command: "tg-admin quickstart -h". This isn't discoverable--neither "tg-admin" nor "tg-admin help" tell you this.

Because many developers are familiar with svn or cvs, tg-admin should follow their precedent:

"tg-admin" => list of commands, with both "help" and "help <command>" explained "tg-admin help" => same as above "tg-admin help <command>" => help for a specific command

Change History

08/20/06 19:26:04 changed by elvelind

  • owner changed from anonymous to elvelind.
  • status changed from new to assigned.

09/23/06 20:00:39 changed by jorge.vargas

  • milestone set to 1.0b4.

01/11/07 14:53:47 changed by alberto

  • milestone changed from 1.0b4 to 1.1.

01/31/07 09:22:51 changed by jorge.vargas

  • component changed from TurboGears to tg-admin (non-toolbox).

03/28/07 12:42:14 changed by alberto

  • milestone changed from 1.1 to __unclassified__.

Batch moved into unclassified from 1.1 to properly track progress on the later

02/05/08 08:23:00 changed by Chris Arndt

  • summary changed from tg-admin help is non-discoverable to Add a "tg-admin help" command.
  • milestone changed from __unclassified__ to 1.1.

Currently, every tg-admin command is implemented as its own class and does its own command line parsing. So when you call tg-admin <command> help, control has already passed to the class implementing <command> and tg-admin is out of the loop and the help argument has to be recognised by <command> itself.

We could implement tg-admin help <command> by adding a class fo a help command. I changed the ticket title to better reflect this.

Also, we can improve the tg-admin help message by mentioning, that most commands take a -h option, e.g.:

TurboGears 1.0.4.3 command line interface

Usage: tg-admin [options] <command> [command options]

Options:
    -c CONFIG --config=CONFIG    Config file to use
    -e EGG_SPEC --egg=EGG_SPEC   Run command on given Egg

Commands:
      i18n  Manage i18n data
      info  Show version info
quickstart  Create a new TurboGears project
     shell  Start a Python prompt with your database available
       sql  Run the database provider manager
   toolbox  Launch the TurboGears Toolbox
    update  Update an existing turbogears project

Use "tg-admin <command> -h" to get help on <command>.

06/06/08 04:31:16 changed by faide

  • severity changed from normal to minor.
  • milestone changed from 1.1 to 1.1.1.

08/24/08 10:27:19 changed by faide

  • milestone changed from 1.6 to 1.5.