mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-03 11:44:18 +01:00
Global: improve support of --help *-format
Also fix some bugs found when refactoring
This commit is contained in:
@@ -49,7 +49,7 @@ void ffPrintTerminalFont(FFTerminalFontOptions* options)
|
||||
|
||||
void ffInitTerminalFontOptions(FFTerminalFontOptions* options)
|
||||
{
|
||||
ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_TERMINALFONT_MODULE_NAME, ffParseTerminalFontCommandOptions, ffParseTerminalFontJsonObject, ffPrintTerminalFont, ffGenerateTerminalFontJson);
|
||||
ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_TERMINALFONT_MODULE_NAME, ffParseTerminalFontCommandOptions, ffParseTerminalFontJsonObject, ffPrintTerminalFont, ffGenerateTerminalFontJson, ffPrintTerminalFontHelpFormat);
|
||||
ffOptionInitModuleArg(&options->moduleArgs);
|
||||
}
|
||||
|
||||
@@ -124,3 +124,13 @@ void ffGenerateTerminalFontJson(FF_MAYBE_UNUSED FFTerminalOptions* options, yyjs
|
||||
ffFontDestroy(&result.font);
|
||||
ffFontDestroy(&result.fallback);
|
||||
}
|
||||
|
||||
void ffPrintTerminalFontHelpFormat(void)
|
||||
{
|
||||
ffPrintModuleFormatHelp(FF_TERMINALFONT_MODULE_NAME, "{1}", FF_TERMINALFONT_NUM_FORMAT_ARGS, (const char* []) {
|
||||
"Terminal font combined",
|
||||
"Terminal font name",
|
||||
"Terminal font size",
|
||||
"Terminal font styles"
|
||||
});
|
||||
}
|
||||
|
||||
@@ -10,3 +10,4 @@ bool ffParseTerminalFontCommandOptions(FFTerminalFontOptions* options, const cha
|
||||
void ffDestroyTerminalFontOptions(FFTerminalFontOptions* options);
|
||||
void ffParseTerminalFontJsonObject(FFTerminalFontOptions* options, yyjson_val* module);
|
||||
void ffGenerateTerminalFontJson(FFTerminalOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module);
|
||||
void ffPrintTerminalFontHelpFormat(void);
|
||||
|
||||
Reference in New Issue
Block a user