Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1072 (closed enhancement: fixed)

Opened 11 years ago

Last modified 7 years ago

Add a "tg-admin help" command

Reported by: tlesher Owned by: elvelind
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

comment:1 Changed 11 years ago by elvelind

  • Status changed from new to assigned
  • Owner changed from anonymous to elvelind

comment:2 Changed 11 years ago by jorge.vargas

  • Milestone set to 1.0b4

comment:3 Changed 11 years ago by alberto

  • Milestone changed from 1.0b4 to 1.1

comment:4 Changed 11 years ago by jorge.vargas

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

comment:5 Changed 11 years ago by alberto

  • Milestone changed from 1.1 to __unclassified__

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

comment:6 Changed 10 years ago by Chris Arndt

  • Milestone changed from __unclassified__ to 1.1
  • Summary changed from tg-admin help is non-discoverable to Add a "tg-admin help" command

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>.

comment:7 Changed 9 years ago by faide

  • Severity changed from normal to minor
  • Milestone changed from 1.1 to 1.1.1

comment:8 Changed 9 years ago by faide

  • Milestone changed from 1.6 to 1.5

comment:9 Changed 7 years ago by chrisz

  • Status changed from assigned to closed
  • Resolution set to fixed

Done in r7246.

Note: See TracTickets for help on using tickets.