diff --git a/CHANGELOG.md b/CHANGELOG.md index c3a0896e5..60e4a3a1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,7 @@ Features: * Support winget package manager detection, guarded behind `--allow-slow-operations` (Packages, Windows) * Print monitor type (built-in or external) (Display) * Support full GPU detection in WSL (Linux, GPU) -* Add `--module-key " "` as a magic case for hiding keys +* Add `--module-key " "` as a special case for hiding keys Bugfixes: * Fix fastfetch hanging in specific environment (#561) diff --git a/src/modules/custom/custom.c b/src/modules/custom/custom.c index 38dd4189a..6576cd3c5 100644 --- a/src/modules/custom/custom.c +++ b/src/modules/custom/custom.c @@ -12,7 +12,7 @@ void ffPrintCustom(FFCustomOptions* options) return; } - ffPrintLogoAndKey(options->moduleArgs.key.length == 0 ? NULL : FF_CUSTOM_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT); + ffPrintLogoAndKey(FF_CUSTOM_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT); ffStrbufWriteTo(&options->moduleArgs.outputFormat, stdout); puts(FASTFETCH_TEXT_MODIFIER_RESET); } @@ -21,6 +21,7 @@ void ffInitCustomOptions(FFCustomOptions* options) { ffOptionInitModuleBaseInfo(&options->moduleInfo, FF_CUSTOM_MODULE_NAME, ffParseCustomCommandOptions, ffParseCustomJsonObject, ffPrintCustom, NULL); ffOptionInitModuleArg(&options->moduleArgs); + ffStrbufSetStatic(&options->moduleArgs.key, " "); } bool ffParseCustomCommandOptions(FFCustomOptions* options, const char* key, const char* value)