diff --git a/src/data/help.json b/src/data/help.json index e99c6867f..40382f2d8 100644 --- a/src/data/help.json +++ b/src/data/help.json @@ -846,6 +846,18 @@ "default": -1 } }, + { + "long": "fraction-trailing-zeros", + "desc": "Set when to keep trailing zeros", + "arg": { + "type": "enum", + "enum": { + "default": "Use the behavior defined internally", + "always": "Always keep trailing zeros", + "never": "Never keep trailing zeros" + } + } + }, { "long": "temp-unit", "desc": "Set the temperature unit", diff --git a/src/options/display.c b/src/options/display.c index 2d685dd88..00bc0898c 100644 --- a/src/options/display.c +++ b/src/options/display.c @@ -711,6 +711,15 @@ bool ffOptionsParseDisplayCommandLine(FFOptionsDisplay* options, const char* key } else if(ffStrEqualsIgnCase(key, "--fraction-ndigits")) options->fractionNdigits = (int8_t) ffOptionParseInt32(key, value); + else if(ffStrEqualsIgnCase(key, "--fraction-trailing-zeros")) + { + options->fractionTrailingZeros = (FFFractionTrailingZerosType) ffOptionParseEnum(key, value, (FFKeyValuePair[]) { + { "default", FF_FRACTION_TRAILING_ZEROS_TYPE_DEFAULT }, + { "show", FF_FRACTION_TRAILING_ZEROS_TYPE_SHOW }, + { "hide", FF_FRACTION_TRAILING_ZEROS_TYPE_HIDE }, + {}, + }); + } else if(ffStrEqualsIgnCase(key, "--no-buffer")) options->noBuffer = ffOptionParseBoolean(value); else if(ffStrStartsWithIgnCase(key, "--bar-"))