"""Constructor for xonsh completer objects."""importcollectionsfromxonsh.completers._aliasesimportcomplete_aliasesfromxonsh.completers.baseimportcomplete_basefromxonsh.completers.bashimportcomplete_from_bashfromxonsh.completers.commandsimport(complete_end_proc_keywords,complete_end_proc_tokens,complete_skipper,complete_xompletions,)fromxonsh.completers.environmentimportcomplete_environment_varsfromxonsh.completers.importsimportcomplete_importfromxonsh.completers.manimportcomplete_from_manfromxonsh.completers.pathimportcomplete_pathfromxonsh.completers.pythonimportcomplete_python
[docs]defdefault_completers(cmd_cache):"""Creates a copy of the default completers."""defaults=[# non-exclusive completers:("end_proc_tokens",complete_end_proc_tokens),("end_proc_keywords",complete_end_proc_keywords),("environment_vars",complete_environment_vars),# exclusive completers:("base",complete_base),("skip",complete_skipper),("alias",complete_aliases),("xompleter",complete_xompletions),("import",complete_import),]forcmd,funcin[("bash",complete_from_bash),("man",complete_from_man),]:ifcmdincmd_cache:defaults.append((cmd,func))defaults.extend([("python",complete_python),("path",complete_path),])returncollections.OrderedDict(defaults)