Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# 2.0.4

Bugfixes:
* Fix building on 32-bit FreeBSD (Memory, BSD)
* Fix `--file-raw` doesn't work (Logo)

Features:
* Trait `-` as an alias for `/dev/stdin`. Available for `--file`, `--file-raw` and `--raw` (Logo)

# 2.0.3

Bugfixes:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url

project(fastfetch
VERSION 2.0.3
VERSION 2.0.4
LANGUAGES C
DESCRIPTION "Fast system information tool"
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
Expand Down
2 changes: 1 addition & 1 deletion src/detection/memory/memory_bsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

const char* ffDetectMemory(FFMemoryResult* ram)
{
uint64_t length = sizeof(ram->bytesTotal);
size_t length = sizeof(ram->bytesTotal);
if (sysctl((int[]){ CTL_HW, HW_PHYSMEM }, 2, &ram->bytesTotal, &length, NULL, 0))
return "Failed to read hw.physmem";

Expand Down
3 changes: 2 additions & 1 deletion src/fastfetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,8 @@ static void parseArguments(FFdata* data, int argc, const char** argv)
}

if(i == argc - 1 || (
*argv[i + 1] == '-' &&
argv[i + 1][0] == '-' &&
argv[i + 1][1] != '\0' && // `-` is used as an alias for `/dev/stdin`
strcasecmp(argv[i], "--separator-string") != 0 // Separator string can start with a -
)) {
parseOption(data, argv[i], NULL);
Expand Down
5 changes: 4 additions & 1 deletion src/logo/logo.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,10 @@ static bool logoPrintFileIfExists(bool doColorReplacement, bool raw)

FF_STRBUF_AUTO_DESTROY content = ffStrbufCreate();

if(!ffAppendFileBuffer(options->source.chars, &content))
if(ffStrbufEqualS(&options->source, "-")
? !ffAppendFDBuffer(FFUnixFD2NativeFD(STDIN_FILENO), &content)
: !ffAppendFileBuffer(options->source.chars, &content)
)
{
fprintf(stderr, "Logo: Failed to load file content from logo source: %s \n", options->source.chars);
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/logo/option.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ bool ffParseLogoCommandOptions(FFLogoOptions* options, const char* key, const ch
ffOptionParseString(key, value, &options->source);
options->type = FF_LOGO_TYPE_FILE;
}
else if(strcasecmp(key, "raw") == 0)
else if(strcasecmp(subKey, "raw") == 0)
{
ffOptionParseString(key, value, &options->source);
options->type = FF_LOGO_TYPE_FILE_RAW;
Expand Down