mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 00:37:23 +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 ffPrintIcons(FFIconsOptions* options)
|
||||
|
||||
void ffInitIconsOptions(FFIconsOptions* options)
|
||||
{
|
||||
ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_ICONS_MODULE_NAME, ffParseIconsCommandOptions, ffParseIconsJsonObject, ffPrintIcons, ffGenerateIconsJson);
|
||||
ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_ICONS_MODULE_NAME, ffParseIconsCommandOptions, ffParseIconsJsonObject, ffPrintIcons, ffGenerateIconsJson, ffPrintIconsHelpFormat);
|
||||
ffOptionInitModuleArg(&options->moduleArgs);
|
||||
}
|
||||
|
||||
@@ -81,3 +81,10 @@ void ffGenerateIconsJson(FF_MAYBE_UNUSED FFIconsOptions* options, yyjson_mut_doc
|
||||
|
||||
yyjson_mut_obj_add_strbuf(doc, module, "result", &icons);
|
||||
}
|
||||
|
||||
void ffPrintIconsHelpFormat(void)
|
||||
{
|
||||
ffPrintModuleFormatHelp(FF_ICONS_MODULE_NAME, "{1}", FF_ICONS_NUM_FORMAT_ARGS, (const char* []) {
|
||||
"Combined icons"
|
||||
});
|
||||
}
|
||||
|
||||
@@ -10,3 +10,4 @@ bool ffParseIconsCommandOptions(FFIconsOptions* options, const char* key, const
|
||||
void ffDestroyIconsOptions(FFIconsOptions* options);
|
||||
void ffParseIconsJsonObject(FFIconsOptions* options, yyjson_val* module);
|
||||
void ffGenerateIconsJson(FFIconsOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module);
|
||||
void ffPrintIconsHelpFormat(void);
|
||||
|
||||
Reference in New Issue
Block a user