diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-05-30 08:25:25 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-05-30 08:29:16 -0700 |
commit | b9acfa6ab04d05d9ad34f3e203bfc498a1bf2f11 (patch) | |
tree | fcc0866d948c5460a09eeac2a3fc1318d6c8291c | |
parent | 6aa77bc0efc27d976f2d478ca54fa59a7c47e934 (diff) |
til: find explicitly set experimental modules
b9123bbb added describing incoming preexisting settings, but the
spec's returned values omitted experimental modules. This
resulted in breaking the ability to say things like --module=rkt
to access the experimental rkt module despite it not showing in
the interactive setup list of values.
This commit includes experimental modules in the spec's values
when being produced for a preexisting, undescribed setting.
Restoring one's ability to access experimental modules via the
CLI.
-rw-r--r-- | src/til.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -279,7 +279,13 @@ int til_module_setup(const til_settings_t *settings, til_setting_t **res_setting int r; for (unsigned i = 0, j = 0; i < nelems(modules); i++) { - if ((modules[i]->flags & TIL_MODULE_EXPERIMENTAL)) + /* XXX: This only skips experimental modules when no module setting was pre-specified, + * which allows accessing the experimental modules via the CLI without showing them + * in the interactive setup where the desc provides the displayed list of values before + * the module setting gets added. It seems a big kludge-y and fragile, but works well + * enough for now to get at the experimental modules during testing/development. + */ + if (!name && (modules[i]->flags & TIL_MODULE_EXPERIMENTAL)) continue; values[j] = modules[i]->name; |