mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 08:13:44 +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 ffPrintTheme(FFThemeOptions* options)
|
||||
|
||||
void ffInitThemeOptions(FFThemeOptions* options)
|
||||
{
|
||||
ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_THEME_MODULE_NAME, ffParseThemeCommandOptions, ffParseThemeJsonObject, ffPrintTheme, ffGenerateThemeJson);
|
||||
ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_THEME_MODULE_NAME, ffParseThemeCommandOptions, ffParseThemeJsonObject, ffPrintTheme, ffGenerateThemeJson, ffPrintThemeHelpFormat);
|
||||
ffOptionInitModuleArg(&options->moduleArgs);
|
||||
}
|
||||
|
||||
@@ -81,3 +81,10 @@ void ffGenerateThemeJson(FF_MAYBE_UNUSED FFThemeOptions* options, yyjson_mut_doc
|
||||
|
||||
yyjson_mut_obj_add_strbuf(doc, module, "result", &theme);
|
||||
}
|
||||
|
||||
void ffPrintThemeHelpFormat(void)
|
||||
{
|
||||
ffPrintModuleFormatHelp(FF_THEME_MODULE_NAME, "{1}", FF_THEME_NUM_FORMAT_ARGS, (const char* []) {
|
||||
"Combined themes"
|
||||
});
|
||||
}
|
||||
|
||||
@@ -10,3 +10,4 @@ bool ffParseThemeCommandOptions(FFThemeOptions* options, const char* key, const
|
||||
void ffDestroyThemeOptions(FFThemeOptions* options);
|
||||
void ffParseThemeJsonObject(FFThemeOptions* options, yyjson_val* module);
|
||||
void ffGenerateThemeJson(FFThemeOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module);
|
||||
void ffPrintThemeHelpFormat(void);
|
||||
|
||||
Reference in New Issue
Block a user