# Using commandline for cvs-like commands and help?

**URL:** <https://www.ruby-forum.com/t/using-commandline-for-cvs-like-commands-and-help/169104>\
**Category:** Ruby\
**Created:** [May 29, 2009, 1:44pm UTC](https://www.ruby-forum.com/t/using-commandline-for-cvs-like-commands-and-help/169104 "2009-05-29T13:44:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Markus\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c4cdca/32.png) [@Markus\_F](https://www.ruby-forum.com/u/Markus_F)\
**Post date:** [May 29, 2009, 1:44pm UTC](https://www.ruby-forum.com/t/using-commandline-for-cvs-like-commands-and-help/169104/1 "2009-05-29T13:44:25Z")

</div>

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](http://rubyforge.org/docman/view.php/632/233/posted-docs.index.html)
