fastfetch-cli / fastfetch-cli/fastfetch

[FEAT] Support SDKMAN! Package Count

Open
#2,027 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C
Stars
24.6k
Forks
890
Avg merge
1d 42m
Merged PRs (30d)
17

Description

### Description

Add [SDKMAN!](https://sdkman.io) package count to the output.

### Motivation

I think this falls under the same category as other package managers. SDKMAN! is popular and widely used across multiple Unix platforms to install system-wide SDKs and frameworks.

### Additional context

This should be relatively easy and useful for those using SDKMAN! to install SDKs and packages. Here's how to detect the count:
1. Get the candidates' directory from the variable `$SDKMAN_CANDIDATES_DIR`. If it is empty, then SDKMAN! is not installed.
2. Count the number of **_non-empty_** directories inside `$SDKMAN_CANDIDATES_DIR`. SDKMAN! can leave empty directories for uninstalled SDK candidates, so it is important to count the non-empty directories only (i.e., a bit more involved than a simple `getNumElements` call).

Note that this counts every SDK or framework installed as 1 (even if there are multiple versions installed for it), which is, in my opinion, the correct thing to do.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.