OpenQuizz
Une application de gestion des contenus pédagogiques
pip._internal.cli.autocompletion Namespace Reference

Functions

def autocomplete ()
 
def get_path_completion_type (cwords, cword, opts)
 
def auto_complete_paths (current, completion_type)
 

Detailed Description

Logic that powers autocompletion installed by ``pip completion``.

Function Documentation

◆ auto_complete_paths()

def pip._internal.cli.autocompletion.auto_complete_paths (   current,
  completion_type 
)
If ``completion_type`` is ``file`` or ``path``, list all regular files
and directories starting with ``current``; otherwise only list directories
starting with ``current``.

:param current: The word to be completed
:param completion_type: path completion type(`file`, `path` or `dir`)i
:return: A generator of regular files and/or directories

◆ autocomplete()

def pip._internal.cli.autocompletion.autocomplete ( )
Entry Point for completion of main and subcommand options.

◆ get_path_completion_type()

def pip._internal.cli.autocompletion.get_path_completion_type (   cwords,
  cword,
  opts 
)
Get the type of path completion (``file``, ``dir``, ``path`` or None)

:param cwords: same as the environmental variable ``COMP_WORDS``
:param cword: same as the environmental variable ``COMP_CWORD``
:param opts: The available options to check
:return: path completion type (``file``, ``dir``, ``path`` or None)