--nocache option added

This commit is contained in:
Linus Dierheimer
2021-04-18 19:23:54 +02:00
parent 1d47eb0c60
commit 3e9ce54f63
2 changed files with 8 additions and 1 deletions
+1
View File
@@ -111,6 +111,7 @@ __fastfetch_completion()
local FF_OPTIONS_BOOL=(
"-r"
"--recache"
"--nocache"
"--show-errors"
"--color-logo"
"--print-remaining-logo"
+7 -1
View File
@@ -51,7 +51,8 @@ static inline void printHelp()
" -s <str>, --seperator <str>: sets the seperator between key and value. Default is a colon with a space\n"
" -x <offset>, --offsetx <offset>: sets the x offset. Can be negative to cut the logo, but no more than logo width.\n"
" --show-errors <?value>: print occuring errors\n"
" -r <?value> --recache <?value>: if set to true, no cached values will be used\n"
" -r <?value> --recache <?value>: generate new cached values\n"
" --nocache <?value>: dont use cached values, but also dont overwrite existing ones\n"
" --print-remaining-logo <?value>: print the remaining logo, if it is higher than the number of lines shown\n"
" --multithreading <?value>: use multiple threads to calculate values\n"
"\n"
@@ -549,6 +550,11 @@ static void parseOption(FFinstance* instance, FFdata* data, const char* key, con
instance->config.recache = optionParseBoolean(value);
instance->config.cacheSave = instance->config.recache;
}
else if(strcasecmp(key, "--nocache") == 0)
{
instance->config.recache = optionParseBoolean(value);
instance->config.cacheSave = false;
}
else if(strcasecmp(key, "--show-errors") == 0)
instance->config.showErrors = optionParseBoolean(value);
else if(strcasecmp(key, "--color-logo") == 0)