Commits

Richo Healey committed af61824

Have a default account

Comments (0)

Files changed (2)

 module Twat
   VERSION_MAJOR = 0
   VERSION_MINOR = 2
-  VERSION_PATCH = 2
+  VERSION_PATCH = 3
 
   VERSION = "#{VERSION_MAJOR}.#{VERSION_MINOR}.#{VERSION_PATCH}"
   class Twat

lib/twat/argparse.rb

       options = Hash.new
       @optparser = OptionParser.new do |opts|
         options[:action] = :tweet
-        opts.banner = "Usage: #{$0} -a ACCOUNT <tweet>"
-        opts.on('-n', '--account ACCOUNT', 'Tweet from ACCOUNT') do |acct|
+        options[:account] = :default
+        opts.banner = "Usage: twat <tweet>"
+        opts.on('-n', '--account ACCOUNT', 'Tweet from ACCOUNT (or default)') do |acct|
           options[:account] = acct.to_sym
         end
         opts.on('-a', '--add ACCOUNT', 'Configure and authorise ACCOUNT') do |acct|