Fix --logo option when using not existent file

This commit is contained in:
Linus Dierheimer
2021-12-06 20:02:49 +01:00
parent aaa6f32f15
commit 7f846dadaf
2 changed files with 19 additions and 1 deletions
+18
View File
@@ -0,0 +1,18 @@
#compdef _fastfetch fastfetch
function _fastfetch() {
local line
# single options
_arguments -C
if [[ ${#line[@]} -eq 0 ]]; then
_arguments -C \
{-h,--help}'[print help message and exit]' \
{-v,--version}'[print version and exit]'
fi
_arguments -C \
'(--structure)'{-s,--structure}'[Supply the structure to use]'
}
+1 -1
View File
@@ -852,7 +852,7 @@ void ffLoadLogoSet(FFinstance* instance, const char* logo)
ffStrbufDestroy(&logoChars);
if(instance->config.showErrors)
printf(FASTFETCH_TEXT_MODIFIER_ERROR"Error: unknown logo / logo file not found: %s"FASTFETCH_TEXT_MODIFIER_RESET"\n", logo);
instance->config.logo = getLogoUnknown();
setLogo(instance, getLogoUnknown());
return;
}