Compare commits

...

5 Commits

Author SHA1 Message Date
Carter Li 745a8dda65 Merge pull request #540 from fastfetch-cli/dev
Release v2.0.4
2023-08-25 15:41:50 +08:00
李通洲 c40086615f Release v2.0.4 2023-08-25 15:05:39 +08:00
李通洲 fe3d38e542 Logo: trait - as an alias for /dev/stdin
which can be useful where `/dev/stdin` is not available, eg. on Windows
2023-08-25 11:03:37 +08:00
李通洲 f19a3b5549 Logo: fix --file-raw doesn't work
Fix #539
Ref https://github.com/hykilpikonna/hyfetch/issues/173
2023-08-25 11:01:48 +08:00
李通洲 eb308e1861 Memory (BSD): fix building on 32-bit FreeBSD
fix #538
2023-08-25 08:47:16 +08:00
6 changed files with 18 additions and 5 deletions
+9
View File
@@ -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:
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -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";
+2 -1
View File
@@ -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);
+4 -1
View File
@@ -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;
+1 -1
View File
@@ -126,7 +126,7 @@ logoType:
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;