Elektra  0.9.0
Plugin: gopts

This plugin is very simple in what it does. It uses system specific methods of accessing argc and argv outside of main and then calls elektraGetOpts to do options processing.

Usage

The preferred way of using this plugin is via kdbEnsure:

KDB * kdb = kdbOpen (parentKey);
KeySet * contract = ksNew (1, keyNew ("system/elektra/ensure/plugins/global/gopts", KEY_VALUE, "mounted", KEY_END), KS_END);
int rc = kdbEnsure (kdb, contract, parentKey);
if (rc != 0)
{
// error handling
}
// gopts now mounted
KeySet * ks = ksNew (0, KS_END);
kdbGet (kdb, ks, parentKey);