mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 16:34:47 +01:00
completers can now raise StopIteration to prevent considering remaining completers
This commit is contained in:
parent
7cc777a066
commit
aae9f2b260
1 changed files with 4 additions and 1 deletions
|
@ -38,7 +38,10 @@ class Completer(object):
|
|||
"""
|
||||
ctx = ctx or {}
|
||||
for func in builtins.__xonsh_completers__.values():
|
||||
out = func(prefix, line, begidx, endidx, ctx)
|
||||
try:
|
||||
out = func(prefix, line, begidx, endidx, ctx)
|
||||
except StopIteration:
|
||||
return set(), len(prefix)
|
||||
if isinstance(out, Sequence):
|
||||
res, lprefix = out
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue