Skip to content

Commit

Permalink
Truncate input after cursor. Fixes #351 (#352)
Browse files Browse the repository at this point in the history
  • Loading branch information
kislyuk authored Nov 8, 2021
1 parent df6389f commit bd66091
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions argcomplete/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class ArgcompleteException(Exception):
def split_line(line, point=None):
if point is None:
point = len(line)
line = line[:point]
lexer = shlex.shlex(line, posix=True)
lexer.whitespace_split = True
lexer.wordbreaks = os.environ.get("_ARGCOMPLETE_COMP_WORDBREAKS", "")
Expand Down

0 comments on commit bd66091

Please sign in to comment.