recline.repl.completer module
Original © NetApp 2024
This module implements a readline completer for completing command names as well as argument names and values.
- class recline.repl.completer.CommandCompleter(commands)
Bases:
object
A completer object that can be used to get the possible next choices for the user’s current input. Used with readline’s set_completer() function.
- completer(text, state)
To be used with readline’s set_completer() function
- static get_command_name(text, options, exact=True)
The text contains a complete command if there is 1 and only 1 command which contains the text’s prefix
- recline.repl.completer.match_command_hook(substitution, matches, *_)
Print a list of completion choices in columns and reprint the prompt
- recline.repl.completer.print_columns(objects, cols=3, gap=2)
Print a list of items in rows and columns