mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 00:03:58 +01:00
Global: improve support of --help *-format
Also fix some bugs found when refactoring
This commit is contained in:
+11
-1
@@ -55,7 +55,7 @@ exit:
|
||||
|
||||
void ffInitBiosOptions(FFBiosOptions* options)
|
||||
{
|
||||
ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_BIOS_MODULE_NAME, ffParseBiosCommandOptions, ffParseBiosJsonObject, ffPrintBios, ffGenerateBiosJson);
|
||||
ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_BIOS_MODULE_NAME, ffParseBiosCommandOptions, ffParseBiosJsonObject, ffPrintBios, ffGenerateBiosJson, ffPrintBiosHelpFormat);
|
||||
ffOptionInitModuleArg(&options->moduleArgs);
|
||||
}
|
||||
|
||||
@@ -125,3 +125,13 @@ exit:
|
||||
ffStrbufDestroy(&bios.vendor);
|
||||
ffStrbufDestroy(&bios.version);
|
||||
}
|
||||
|
||||
void ffPrintBiosHelpFormat(void)
|
||||
{
|
||||
ffPrintModuleFormatHelp(FF_BIOS_MODULE_NAME, "{4} ({2})", FF_BIOS_NUM_FORMAT_ARGS, (const char* []) {
|
||||
"bios date",
|
||||
"bios release",
|
||||
"bios vendor",
|
||||
"bios version"
|
||||
});
|
||||
}
|
||||
|
||||
@@ -10,3 +10,4 @@ bool ffParseBiosCommandOptions(FFBiosOptions* options, const char* key, const ch
|
||||
void ffDestroyBiosOptions(FFBiosOptions* options);
|
||||
void ffParseBiosJsonObject(FFBiosOptions* options, yyjson_val* module);
|
||||
void ffGenerateBiosJson(FFBiosOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module);
|
||||
void ffPrintBiosHelpFormat(void);
|
||||
|
||||
Reference in New Issue
Block a user