Hey Lucas, Joachim,

Attached is a patch that will fix both problems.

Regards,
Paul

-- 
Student @ Eindhoven                         | email: [EMAIL PROTECTED]
University of Technology, The Netherlands   | JID: [EMAIL PROTECTED]
>>> Using the Power of Debian GNU/Linux <<< | GnuPG key ID: 0x50064181
--- bin/feed2imap.orig  2006-10-04 23:15:15.000000000 +0200
+++ bin/feed2imap       2006-10-04 23:26:38.000000000 +0200
@@ -9,8 +9,10 @@
 version = false
 cacherebuild = false
 configf = ENV['HOME'] + '/.feed2imaprc'
+progname = File.basename($PROGRAM_NAME)
 opts = OptionParser::new do |opts|
-  opts.banner = "Usage: ./feed2imap.rb [options]"
+  opts.program_name = progname
+  opts.banner = "Usage: #{progname} [options]"
   opts.separator ""
   opts.separator "Options:"
   opts.on("-v", "--verbose", "Verbose mode") do |v|
@@ -26,7 +28,13 @@
     configf = f
   end
 end
-opts.parse!(ARGV)
+begin
+  opts.parse!(ARGV)
+rescue OptionParser::ParseError => pe
+  opts.warn pe
+  puts opts
+  exit 1
+end
 
 if version
   puts "Feed2Imap v.#{F2I_VERSION}"

Reply via email to