Filename Completion

File and directory name completion.

class kmd.completions.filename.FilenameCompletion(quote_char='\')

Complete file and directory names. The ‘quote_char’ argument specifies the preferred quoting style. Available styles are single-quote, double-quote, and backslash (the default).

FilenameCompletion.__call__(text)

Return filenames matching ‘text’. Starts at the current working directory.

FilenameCompletion.char_is_quoted(text, index)

Return True if the character at ‘index’ is quoted. Installed as rl.completer.char_is_quoted_function.

FilenameCompletion.dequote_filename(text, quote_char)

Return a backslash-dequoted version of ‘text’. Installed as rl.completer.filename_dequoting_function.

FilenameCompletion.quote_filename(text, single_match, quote_char)

Return a quote-char quoted version of ‘text’. Installed as rl.completer.filename_quoting_function if the preferred quoting style is single- or double-quote.

FilenameCompletion.backslash_quote_filename(text, single_match, quote_char)

Return a backslash-quoted version of ‘text’. Installed as rl.completer.filename_quoting_function if the preferred quoting style is backslash (the default).

Previous topic

Completions

Next topic

Username Completion