From: "(a slow loris with poison elbows)" (a slow loris with poison elbows) Date: 2005-06-05T06:15:25+09:00 Subject: Re: ruby-dev summary 26128-26222 (Re: ropt/optparse) Eric Hodel writes: > For files with very few options, optparse requires too much typing. I don't think so. It seems to me you can leave out a great quantity of the optparse pooky if you want to keep things simple: require 'optparse' require 'ostruct' opt = OpenStruct.new p = OptionParser.new {|p| p.on('-c C') {|o| opt.color = o} p.on('-i I', Integer) {|o| opt.int = o} }.parse! puts "color is: #{opt.color} (#{opt.color.class})" puts "integer is: #{opt.int} (#{opt.int.class})" You could invoke it like: myprogram -c blue -i 99 Maybe the problem is with optparse documentation. I started with the comment in the code and kept chucking until I got to what is above. At least it is better than Getoptlong. -Loris