Using commandline for cvs-like commands and help?

Discussion in 'Ruby' started by Markus Fischer, May 29, 2009.

  1. Hi,

    I'm trying to get my brain into CommandLine [1] to figure out how to do
    cvs-like command support.

    Something like (just sketching)

    $ ruby myapp.rb --help
    Global options:
    --debug
    --verbose
    Use one of the commands:
    foo
    bar
    baz

    $ ruby myapp.rb foo --help
    Help for myapp.rb foo command....

    The linked documentation has a section "CVS Mode" but in the end refers
    to "More on how this is handled in the usage section.", however I find
    anything.

    In the subsection "OptionData" it mentions:

    od.cmd # not yet implemented - but a cvs like command

    Hmm ...

    I'm using the CommandLine::Application idiom as it makes things very
    clear and well arranged.

    I tried digging into the source, but the only reference I find is in
    commandline/application.rb in expected_args() and there's a comment:

    # expected_args :cmd
    # Now, what to do if command line has more args than expected
    # app --app-option cmd --cmd-option arg-for-cmd
    #

    Does this mean it is not supported?

    thanks,
    - Markus

    [1] http://rubyforge.org/docman/view.php/632/233/posted-docs.index.html
    Markus Fischer, May 29, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ben Pfaff

    Re: man pages for C commands (GCC commands)

    Ben Pfaff, Jun 24, 2003, in forum: C Programming
    Replies:
    4
    Views:
    3,947
    Thomas Stegen
    Jun 28, 2003
  2. Tim Stanka
    Replies:
    1
    Views:
    785
    Jeff Epler
    Aug 2, 2004
  3. ddog
    Replies:
    3
    Views:
    576
    Jason Whaley
    Aug 4, 2007
  4. Replies:
    1
    Views:
    583
    GArlington
    Aug 31, 2007
  5. David Ross
    Replies:
    5
    Views:
    141
    Nicholas Van Weerdenburg
    Dec 5, 2004
Loading...

Share This Page