Skip to content

Commit

Permalink
Merge pull request #17 from rraval/master
Browse files Browse the repository at this point in the history
Use `argparse.REMAINDER` to collect query arguments
  • Loading branch information
gleitz committed Jan 9, 2013
2 parents d55a52a + 93d6465 commit b0cfa4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion howdoi/howdoi.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def howdoi(args):

def command_line_runner():
parser = argparse.ArgumentParser(description='code search tool')
parser.add_argument('query', metavar='QUERY', type=str, nargs='+',
parser.add_argument('query', metavar='QUERY', type=str, nargs=argparse.REMAINDER,
help='the question to answer')
parser.add_argument('-p','--pos', help='select answer in specified position (default: 1)', default=1)
parser.add_argument('-a','--all', help='display the full text of the answer',
Expand Down

0 comments on commit b0cfa4d

Please sign in to comment.