base completer: Don't complete unnecessarily

This commit is contained in:
Daniel Shimon 2020-07-23 16:17:19 +03:00
parent b7bba551e1
commit 5b33427c61

View file

@ -11,6 +11,10 @@ def complete_base(prefix, line, start, end, ctx):
and paths. If we are completing the first argument, complete based on
valid commands and python names.
"""
if line.strip() and prefix != line:
# don't do unnecessary completions
return set()
# get and unpack python completions
python_comps = complete_python(prefix, line, start, end, ctx)
if isinstance(python_comps, cabc.Sequence):