Skip to content

Commit 05f5e25

Browse files
committed
Packages: rearranges the packages output in alphabet order
... and improves string format logic
1 parent 4b4c37e commit 05f5e25

4 files changed

Lines changed: 195 additions & 177 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# 2.62.0
22

3+
Changes:
4+
* Sort package managers alphabetically in output and format arguments (Packages)
5+
* The positional order of format arguments has changed — this is a breaking change for users relying on numeric placeholders. Named arguments are always preferred; e.g., use `{pacman}` (refer to `fastfetch -h packages-format`) instead of `{1}` to keep your config future-proof.
6+
37
Features:
48
* Reports `Unused` instead of `Disabled` for zero-size swap on macOS (#2248, Swap, macOS)
59
* Improves the robustness of default route detection on Linux (#2252, LocalIP, Linux)

src/detection/packages/packages.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ const char* ffDetectPackages(FFPackagesResult* result, FFPackagesOptions* option
1818
result->all += ((uint32_t*) result)[i];
1919
}
2020

21-
if (result->all == 0) {
22-
return "No packages from known package managers found";
23-
}
24-
2521
return NULL;
2622
}
2723

src/detection/packages/packages.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
typedef struct FFPackagesResult {
77
uint32_t amSystem;
88
uint32_t amUser;
9-
uint32_t appimage;
109
uint32_t apk;
10+
uint32_t appimage;
1111
uint32_t brew;
1212
uint32_t brewCask;
1313
uint32_t choco;
@@ -26,8 +26,8 @@ typedef struct FFPackagesResult {
2626
uint32_t lpkg;
2727
uint32_t lpkgbuild;
2828
uint32_t macports;
29-
uint32_t mport;
3029
uint32_t moss;
30+
uint32_t mport;
3131
uint32_t nixDefault;
3232
uint32_t nixSystem;
3333
uint32_t nixUser;
@@ -40,8 +40,8 @@ typedef struct FFPackagesResult {
4040
uint32_t pkgsrc;
4141
uint32_t pkgtool;
4242
uint32_t rpm;
43-
uint32_t scoopUser;
4443
uint32_t scoopGlobal;
44+
uint32_t scoopUser;
4545
uint32_t snap;
4646
uint32_t soar;
4747
uint32_t sorcery;

0 commit comments

Comments
 (0)