Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an
init
method to the module that do all the hard work.
This is for simplifying the usage and allowing access to some elements (like the initial configuration or and ``CommandLine`` object) from plugins. This `init` method initialize the ``CommandLine`` object, parse the arguments and set the configuration and the initialized instance to the module namespace. It takes five parameters: * `format`: format of the configuration (*yaml*, *json* or *raw*), * `data`: a filepath for *yaml* and *json* format and a dictionnary for *raw* format, * `completion`: allows to initialize argcomplete for bash/zsh completion, * `subcommands_keyword`: *keyword* parameter of the ``CommandLine`` object, * `deepcopy`: *deepcopy* parameter of the ``CommandLine`` object By default, the configuration is loaded from the YAML file *cmd.yml* on the program directory.
- Loading branch information