Permalink
Browse files

Change flag from --tally to -t

-t is a lot faster to type.
  • Loading branch information...
1 parent eea2e3b commit fb62600b612a0f7f0af5d8b617345416533bf992 @mdippery committed Dec 13, 2012
Showing with 10 additions and 10 deletions.
  1. +1 −1 README.textile
  2. +6 −6 features/browse.feature
  3. +1 −1 features/help.feature
  4. +2 −2 lib/usaidwat/application.rb
View
@@ -18,7 +18,7 @@ bc. $ usaidwat jedberg
To list a count of subreddits in which a user has posted, pass the @--tally@ flag:
-bc. $ usaidwat --tally jedberg
+bc. $ usaidwat -t jedberg
You will see output like the following:
View
@@ -590,7 +590,7 @@ Feature: Browse comments
"""
Scenario: Tally comments
- When I run `usaidwat --tally mipadi`
+ When I run `usaidwat -t mipadi`
Then it should pass with:
"""
apple 6
@@ -982,22 +982,22 @@ Feature: Browse comments
"""
Scenario: Tally comments with subreddit
- When I run `usaidwat --tally mipadi AskReddit`
+ When I run `usaidwat -t mipadi AskReddit`
Then it should fail with:
"""
- Usage: usaidwat [--tally] <user> [<subreddit>]
+ Usage: usaidwat [-t] <user> [<subreddit>]
"""
Scenario: Pass no arguments
When I run `usaidwat`
Then it should fail with:
"""
- Usage: usaidwat [--tally] <user> [<subreddit>]
+ Usage: usaidwat [-t] <user> [<subreddit>]
"""
Scenario: Pass no arguments when tallying
- When I run `usaidwat --tally`
+ When I run `usaidwat -t`
Then it should fail with:
"""
- Usage: usaidwat [--tally] <user> [<subreddit>]
+ Usage: usaidwat [-t] <user> [<subreddit>]
"""
View
@@ -8,7 +8,7 @@ Feature: Get help
When I run `usaidwat --help`
Then it should pass with:
"""
- Usage: usaidwat [--tally] <user> [<subreddit>]
+ Usage: usaidwat [-t] <user> [<subreddit>]
"""
Scenario: Get version
@@ -15,7 +15,7 @@ def run(argv)
end
def usage(code=0)
- puts "Usage: usaidwat [--tally] <user> [<subreddit>]"
+ puts "Usage: usaidwat [-t] <user> [<subreddit>]"
exit code
end
@@ -66,7 +66,7 @@ def handle_arguments(argv)
usage if argv.first == "--help"
version if argv.first == "--version"
opts = {:tally => false}
- if argv.first == "--tally"
+ if argv.first == "-t"
opts[:tally] = true
argv.shift
usage(1) unless argv.length == 1

0 comments on commit fb62600

Please sign in to comment.