diff --git a/pubs/plugins.py b/pubs/plugins.py index 17e2256..c888715 100644 --- a/pubs/plugins.py +++ b/pubs/plugins.py @@ -14,7 +14,7 @@ class PapersPlugin(object): name = None - def get_commands(self, subparsers): + def get_commands(self, subparsers, conf): """Populates the parser with plugins specific command. Returns iterable of pairs (command name, command function to call). """ diff --git a/pubs/plugs/alias/alias.py b/pubs/plugs/alias/alias.py index eebf1f9..7a75467 100644 --- a/pubs/plugs/alias/alias.py +++ b/pubs/plugs/alias/alias.py @@ -65,7 +65,7 @@ class AliasPlugin(PapersPlugin): for name, definition in conf['plugins']['alias'].items(): self.aliases.append(Alias.create_alias(name, definition)) - def update_parser(self, subparsers): + def update_parser(self, subparsers, conf): """Add subcommand to the provided subparser""" for alias in self.aliases: alias_parser = alias.parser(subparsers) diff --git a/pubs/pubs_cmd.py b/pubs/pubs_cmd.py index b1c28c8..bd956cc 100644 --- a/pubs/pubs_cmd.py +++ b/pubs/pubs_cmd.py @@ -80,7 +80,7 @@ def execute(raw_args=sys.argv): # Extend with plugin commands plugins.load_plugins(conf, ui) for p in plugins.get_plugins().values(): - p.update_parser(subparsers) + p.update_parser(subparsers, conf) # Eventually autocomplete autocomplete(parser)