mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-28 15:53:51 +01:00
Global: improve support of --help *-format
Also fix some bugs found when refactoring
This commit is contained in:
@@ -32,7 +32,7 @@ void ffPrintWMTheme(FFWMThemeOptions* options)
|
||||
|
||||
void ffInitWMThemeOptions(FFWMThemeOptions* options)
|
||||
{
|
||||
ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_WMTHEME_MODULE_NAME, ffParseWMThemeCommandOptions, ffParseWMThemeJsonObject, ffPrintWMTheme, ffGenerateWMThemeJson);
|
||||
ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_WMTHEME_MODULE_NAME, ffParseWMThemeCommandOptions, ffParseWMThemeJsonObject, ffPrintWMTheme, ffGenerateWMThemeJson, ffPrintWMthemeHelpFormat);
|
||||
ffOptionInitModuleArg(&options->moduleArgs);
|
||||
}
|
||||
|
||||
@@ -79,3 +79,10 @@ void ffGenerateWMThemeJson(FF_MAYBE_UNUSED FFWMThemeOptions* options, yyjson_mut
|
||||
|
||||
yyjson_mut_obj_add_strbuf(doc, module, "result", &themeOrError);
|
||||
}
|
||||
|
||||
void ffPrintWMthemeHelpFormat(void)
|
||||
{
|
||||
ffPrintModuleFormatHelp(FF_WMTHEME_MODULE_NAME, "{1}", FF_WMTHEME_NUM_FORMAT_ARGS, (const char* []) {
|
||||
"WM theme"
|
||||
});
|
||||
}
|
||||
|
||||
@@ -10,3 +10,4 @@ bool ffParseWMThemeCommandOptions(FFWMThemeOptions* options, const char* key, co
|
||||
void ffDestroyWMThemeOptions(FFWMThemeOptions* options);
|
||||
void ffParseWMThemeJsonObject(FFWMThemeOptions* options, yyjson_val* module);
|
||||
void ffGenerateWMThemeJson(FFWMThemeOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module);
|
||||
void ffPrintWMthemeHelpFormat(void);
|
||||
|
||||
Reference in New Issue
Block a user