From: Jim Freeze Date: 2005-12-29T09:30:48+09:00 Subject: Re: Command-line option parsing ------=_Part_61088_27178231.1135816236587 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Eric You may want to give CommandLine a try. From the examples you give, this is how I would write an app: require 'rubygems' require 'commandline' class MyApp < CommandLine::Application def initialize # Mandatory argument option :names =3D> %w(--require -r), :opt_description =3D> "Require the LIBRARY "+ "before executing your script", :arg_description =3D> "LIBRARY", :opt_found =3D> get_arg, :opt_not_found =3D> required option :names =3D> %w(--inplace -i), :arity =3D> [0,1], :opt_description =3D> "Edit ARGV files in place", :arg_description =3D> "[EXTENSION]", :opt_found =3D> get_arg, end def main #put your code here p opts end end#class MyApp I don't know what #on_tail does either. -- Jim Freeze ------=_Part_61088_27178231.1135816236587--