mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-05 17:00:58 +01:00
be more selective about when to use python completions
This commit is contained in:
parent
f5dee4fc5c
commit
1500a77702
1 changed files with 3 additions and 0 deletions
|
@ -26,6 +26,9 @@ def complete_python(prefix, line, start, end, ctx):
|
|||
Completes based on the contents of the current Python environment,
|
||||
the Python built-ins, and xonsh operators.
|
||||
"""
|
||||
first = line.split()[0]
|
||||
if first in builtins.__xonsh_commands_cache__ and first not in ctx:
|
||||
return None
|
||||
filt = get_filter_function()
|
||||
rtn = {s for s in XONSH_TOKENS if filt(s, prefix)}
|
||||
if ctx is not None:
|
||||
|
|
Loading…
Add table
Reference in a new issue