mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00

* feat: add command completers logic * feat: implement xompleter logic * fix: handle callable object in exception * chore: add xompletions package to setup.py * fix: update tests for changes to command completer logic * docs: * fix: qa errors fixes #4514 * feat: add xonsh completions * refactor: split module matcher to separate class * feat: add django-admin completions * fix: failing tests * feat: add more properties to completion-context * refactor: cleanup code * todo item add
12 lines
359 B
Python
12 lines
359 B
Python
from xonsh.completers.path import complete_dir
|
|
from xonsh.parsers.completion_context import CommandContext
|
|
|
|
|
|
def xonsh_complete(command: CommandContext):
|
|
"""
|
|
Completion for "cd", includes only valid directory names.
|
|
"""
|
|
results, lprefix = complete_dir(command)
|
|
if len(results) == 0:
|
|
raise StopIteration
|
|
return results, lprefix
|