Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Extend plugin support by allowing plugins to run as commands #342

dnaeon opened this Issue · 4 comments

3 participants


Now that we have basic plugins support, the next thing we could do in order to improve them is to provide a way that plugins also act as commands invoked by 'pkg '

The way such plugins would work is to register a hook (e.g. PKG_PLUGINS_HOOK_IS_COMMAND) and be invoked by pkg during command resolution.

Callbacks should have the following prototype:

int plugin_sample_exec(int argc, char **argv)

Arguments are passed similar to what we already do with the other *_exec() functions.

Support for running external programs (e.g. shell scripts) could be added in a later phase as well.




Support for adding new commands provided by plugins has been committed.

Example plugin providing a new command can be found below:


Please make sure the library do not know about the frontend and therefor you have to find a smart way to extend the plugins interface of the lib from the frontend :)


this is in ;)

@bapt bapt closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.