mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 08:13:44 +01:00
Fastfetch: add option --faction-trailing-zeros
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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-"))
|
||||
|
||||
Reference in New Issue
Block a user