Permalink
Browse files

Return from lexer instead of quitting if EOF is found. Fixes #21

  • Loading branch information...
1 parent 32cead8 commit bc955b69f34c7c2cb4d8eb28ba1606c330fd7c85 @kislyuk committed Mar 16, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 argcomplete/__init__.py
View
@@ -87,7 +87,9 @@ def split_word(word):
try:
word = lexer.get_token()
if word == lexer.eof:
- raise ArgcompleteException("Unexpected end of input")
+ # TODO: check if this is ever unsafe
+ # raise ArgcompleteException("Unexpected end of input")
+ return "", "", words
if lexer.instream.tell() >= point:
debug("word", word, "split")
return split_word(word)

0 comments on commit bc955b6

Please sign in to comment.