Skip to content

Commit

Permalink
Adding forgotten help message for tinyurl command
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienPalard committed Jun 6, 2011
1 parent a03da48 commit 3bbcaa6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion commands/tinyurl
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,9 @@ def _tiny(match):
def tiny(string):
return re.sub('http://[^ ]+', _tiny, string)

print tiny(' '.join(sys.argv[1:]))

if len(sys.argv) == 2 and sys.argv[1] == '-h':
print "tinyurl: Shorten urls, you can give a whole text, it will find urls"
print "and shorten only longest ones"
else:
print tiny(' '.join(sys.argv[1:]))

0 comments on commit 3bbcaa6

Please sign in to comment.