#412 closed defect (fixed)

tahoe -h doesn't do what people expect (--help)

Reported by: zooko Owned by:
Priority: minor Milestone: 1.3.0
Component: code-frontend-cli Version: 1.0.0
Keywords: Cc:
Launchpad Bug:

Description

ben posted a transcript which included this bit:

bash-3.2$ bin/tahoe -h
/Users/bhyde/w/scratch/scratch/scratch/allmydata-tahoe-1.0.0-r2537/support/bin/tahoe:  option -h not recognized

Usage:  tahoe <command> [command options]
Options:
  -q, --quiet    Operate silently.
  -V, --version  Display version numbers and exit.
      --help     Display this help and exit.
Commands:

I poked around looking for where the "--help" command is defined but couldn't find it. I guess it is part of twisted.usage itself rather than something that we specified. Hm, there it is:

http://twistedmatrix.com/trac/browser/trunk/twisted/python/usage.py?rev=20243#L176

See also line 188:

http://twistedmatrix.com/trac/browser/trunk/twisted/python/usage.py?rev=20243#L188

which says "#opt_h = opt_help # this conflicted with existing 'host' options."

Change History (2)

comment:1 Changed at 2008-05-07T22:48:00Z by warner

yeah, I'm not clear on how opt_h works in subcommands vs the top-level command table. The "synopsis" contents are also completely confused.

comment:2 Changed at 2008-09-03T01:22:41Z by warner

  • Milestone changed from eventually to 1.3.0
  • Resolution set to fixed
  • Status changed from new to closed

I made some CLI changes about a month ago, and now "tahoe -h" shows a list of commands:

1260:warner@fluxx% ./bin/tahoe -h
Usage:  tahoe <command> [command options]
Options:
  -q, --quiet    Operate silently.
  -V, --version  Display version numbers and exit.
      --help     Display this help and exit.
Commands:
    create-client             Create a client node.
    create-introducer         Create a introducer node.
    create-key-generator      Create a key generator service.
    debug                     debug subcommands: use 'tahoe debug' for a list
    mkdir                     Create a new directory
    add-alias                 Add a new alias cap
    create-alias              Create a new alias cap
    list-aliases              List all alias caps
    ls                        List a directory
    get                       Retrieve a file from the virtual drive.
    put                       Upload a file into the virtual drive.
    cp                        Copy one or more files.
    rm                        Unlink a file or directory in the virtual drive.
    mv                        Move a file within the virtual drive.
    ln                        Make an additional link to an existing file.
    webopen                   Open a webbrowser to the root_dir
    start                     Start a node (of any type).
    stop                      Stop a node.
    restart                   Restart a node.
    run                       Run a node synchronously.

/home/warner/trees/tahoe/support/bin/tahoe:  option -h not recognized

I think that's good enough to close this ticket.

Note: See TracTickets for help on using tickets.