Application base class.
Parameters: |
|
---|
Return an argparse option parser for this application.
Subclasses may override this method to extend the parser with more global options.
Parameters: |
|
---|
Hook run after a command is done to shutdown the app.
Parameters: |
|
---|
Create logging handlers for any log output.
return fuzzy matches of unknown command
Hook for subclasses to take global initialization action after the arguments are parsed but before a command is run. Invoked only once, even in interactive mode.
Parameters: | argv – List of arguments, including the subcommand to run. Empty for interactive mode. |
---|
Perform any preliminary work needed to run a command.
Parameters: | cmd (cliff.command.Command) – command processor being invoked |
---|
Print help and exits if deferred help is enabled and requested.
Equivalent to the main program for the application.
Parameters: | argv (list of str) – input arguments and options |
---|
Provides “interactive mode” features.
Refer to the cmd2 and cmd documentation for details about subclassing and configuring this class.
Parameters: |
|
---|
Default tab-completion for command prefix with completer delimiter.
This method filters only cliff style commands matching provided command prefix (line) as cmd2 style commands cannot contain spaces. This method returns text + missing command part of matching commands. This method does not handle options in cmd2/cliff style commands, you must define complete_$method to handle them.
Tab-completion for command prefix without completer delimiter.
This method returns cmd style and cliff style commands matching provided command prefix (text).
Discovers commands and handles lookup based on argv data.
Parameters: |
|
---|
Given an argument list, find a command and return the processor and any remaining arguments.
Load all the commands from an entrypoint
Base class for command plugins.
Parameters: | app (cliff.app.App) – Application instance invoking the command. |
---|
Return the command description.
Return an argparse.ArgumentParser.
Invoked by the application when the command is run.
Developers implementing commands should override take_action().
Developers creating new command base classes (such as Lister and ShowOne) should override this method to wrap take_action().
Override to do something useful.
Command base class for displaying data about a single object.
Implement the common task of converting a dict-based object to the two-column output that ShowOne expects.
Return a two-part tuple with a tuple of column names and a tuple of values.
Base class for formatters that know how to deal with multiple objects.
Format and print the list from the iterable data source.
Parameters: |
|
---|
Base class for formatters that work with single objects.
Format and print the values associated with the single object.
Parameters: |
|
---|