From 479731f076d2015741dba7505f9ce7babde3ea25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Sun, 5 May 2024 20:02:22 +0800 Subject: [PATCH] Custom: don't print ANSI escape code in pipe mode --- src/modules/custom/custom.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/custom/custom.c b/src/modules/custom/custom.c index 81e5aa416..47a83f77e 100644 --- a/src/modules/custom/custom.c +++ b/src/modules/custom/custom.c @@ -8,7 +8,8 @@ void ffPrintCustom(FFCustomOptions* options) { ffPrintLogoAndKey(FF_CUSTOM_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT); ffStrbufWriteTo(&options->moduleArgs.outputFormat, stdout); - puts(FASTFETCH_TEXT_MODIFIER_RESET); + if(!instance.config.display.pipe) + puts(FASTFETCH_TEXT_MODIFIER_RESET); } bool ffParseCustomCommandOptions(FFCustomOptions* options, const char* key, const char* value)