xonsh.completers.commands#
- class xonsh.completers.commands.CommandCompleter[source]#
Lazily complete commands from xompletions package
The base-name (case-insensitive) of the executable is used to find the matching completer module or the regex patterns.
- property matcher#
- class xonsh.completers.commands.ModuleReMatcher(*names: str)[source]#
supports regex based proxying
Helper class to search and load Python modules
- Parameters
- names
extra search paths/package-names to use if finding module on namespace package fails. paths should have a path literal to indicate it is a path. Otherwise it is treated as a package name.
- get_module(module: str)#
- static import_module(path, name: str)#
given the file location import as module
- wrap(pattern: str, module: str)[source]#
For any commands matching the pattern complete from the
module
- extensions = ('.py', '.xsh')#
- xonsh.completers.commands.complete_command(command: xonsh.parsers.completion_context.CommandContext)[source]#
Returns a list of valid commands starting with the first argument
- xonsh.completers.commands.complete_end_proc_keywords(command_context: xonsh.parsers.completion_context.CommandContext)[source]#
If there’s no space following ‘and’ or ‘or’ - insert one.