mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-28 07:44:06 +01:00
Global: improve support of --help *-format
Also fix some bugs found when refactoring
This commit is contained in:
@@ -52,7 +52,7 @@ void ffPrintCursor(FFCursorOptions* options)
|
||||
|
||||
void ffInitCursorOptions(FFCursorOptions* options)
|
||||
{
|
||||
ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_CURSOR_MODULE_NAME, ffParseCursorCommandOptions, ffParseCursorJsonObject, ffPrintCursor, ffGenerateCursorJson);
|
||||
ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_CURSOR_MODULE_NAME, ffParseCursorCommandOptions, ffParseCursorJsonObject, ffPrintCursor, ffGenerateCursorJson, ffPrintCursorHelpFormat);
|
||||
ffOptionInitModuleArg(&options->moduleArgs);
|
||||
}
|
||||
|
||||
@@ -111,3 +111,11 @@ void ffGenerateCursorJson(FF_MAYBE_UNUSED FFCursorOptions* options, yyjson_mut_d
|
||||
ffStrbufDestroy(&result.theme);
|
||||
ffStrbufDestroy(&result.size);
|
||||
}
|
||||
|
||||
void ffPrintCursorHelpFormat(void)
|
||||
{
|
||||
ffPrintModuleFormatHelp(FF_CURSOR_MODULE_NAME, "{1} ({2}px)", FF_CURSOR_NUM_FORMAT_ARGS, (const char* []) {
|
||||
"Cursor theme",
|
||||
"Cursor size"
|
||||
});
|
||||
}
|
||||
|
||||
@@ -10,3 +10,4 @@ bool ffParseCursorCommandOptions(FFCursorOptions* options, const char* key, cons
|
||||
void ffDestroyCursorOptions(FFCursorOptions* options);
|
||||
void ffParseCursorJsonObject(FFCursorOptions* options, yyjson_val* module);
|
||||
void ffGenerateCursorJson(FFCursorOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module);
|
||||
void ffPrintCursorHelpFormat(void);
|
||||
|
||||
Reference in New Issue
Block a user