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:
+10
-1
@@ -51,7 +51,7 @@ void ffPrintLM(FFLMOptions* options)
|
||||
|
||||
void ffInitLMOptions(FFLMOptions* options)
|
||||
{
|
||||
ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_LM_MODULE_NAME, ffParseLMCommandOptions, ffParseLMJsonObject, ffPrintLM, NULL);
|
||||
ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_LM_MODULE_NAME, ffParseLMCommandOptions, ffParseLMJsonObject, ffPrintLM, ffGenerateLMJson, ffPrintLMHelpFormat);
|
||||
ffOptionInitModuleArg(&options->moduleArgs);
|
||||
}
|
||||
|
||||
@@ -117,3 +117,12 @@ exit:
|
||||
ffStrbufDestroy(&result.type);
|
||||
ffStrbufDestroy(&result.version);
|
||||
}
|
||||
|
||||
void ffPrintLMHelpFormat(void)
|
||||
{
|
||||
ffPrintModuleFormatHelp(FF_LM_MODULE_NAME, "{1} {3} ({2})", FF_LM_NUM_FORMAT_ARGS, (const char* []) {
|
||||
"LM service",
|
||||
"LM type",
|
||||
"LM version"
|
||||
});
|
||||
}
|
||||
|
||||
@@ -10,3 +10,4 @@ bool ffParseLMCommandOptions(FFLMOptions* options, const char* key, const char*
|
||||
void ffDestroyLMOptions(FFLMOptions* options);
|
||||
void ffParseLMJsonObject(FFLMOptions* options, yyjson_val* module);
|
||||
void ffGenerateLMJson(FFLMOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module);
|
||||
void ffPrintLMHelpFormat(void);
|
||||
|
||||
Reference in New Issue
Block a user