Handle maxsplit=-1 correctly for completions
This commit is contained in:
parent
48f9a1a449
commit
0bf918631e
@ -175,7 +175,8 @@ class CommandManager:
|
||||
self._cmd = cmd
|
||||
self._args = args
|
||||
retargs = args[:]
|
||||
if text.endswith(' ') and len(args) <= cmd.maxsplit:
|
||||
if text.endswith(' ') and (cmd.maxsplit == -1 or
|
||||
len(args) <= cmd.maxsplit):
|
||||
retargs.append('')
|
||||
return [cmdstr] + retargs
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user