You are viewing an older version (9.11.0). Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython 9.11.0 / IPython / core / completer / IPCompleter / file_matcher

function

IPython.core.completer:IPCompleter.file_matcher

source: /IPython/core/completer.py :2191

Signature

def   file_matcher ( self context : CompletionContext )  →  SimpleMatcherResult

Summary

Match filenames, expanding ~USER type strings.

Extended Summary

Most of the seemingly convoluted logic in this completer is an attempt to handle filenames with spaces in them. And yet it's not quite perfect, because Python's readline doesn't expose all of the GNU readline details needed for this to be done correctly.

For a filename with a space in it, the printed completions will be only the parts after what's already been typed (instead of the full completions, as is normally done). I don't think with the current (as of Python 2.3) Python readline it's possible to do better.

Aliases

  • IPython.core.completer.IPCompleter.file_matcher