Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fastfetch --help command is incomplete in version 2.3.3 #653

Closed
henriqueffc opened this issue Dec 7, 2023 · 8 comments
Closed

fastfetch --help command is incomplete in version 2.3.3 #653

henriqueffc opened this issue Dec 7, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@henriqueffc
Copy link

henriqueffc commented Dec 7, 2023

The --help option is incomplete in version 2.3.3 available in the Arch Linux repository. The message shown appears to be incomplete, without all the available options that were presented with the --help option. I use the Alacritty terminal, with zsh, tmux and p10k. Other options are working correctly.

The fastfetch --help command displays the following message:

$ fastfetch --help                                                                                                                                          
Fastfetch is a neofetch-like tool for fetching system information and displaying them in a pretty way

Usage: fastfetch <?options>


Parsing is not case sensitive. E.g. "--lib-PCI" is equal to "--Lib-Pci"
If a value starts with a ?, it is optional. An optional boolean value defaults to true if not specified.
More detailed help messages for each options can be printed with "-h <option_without_dash_prefix>"
All options can be made permanent with command "fastfetch <options> --gen-config"
$ env NO_CONFIG=1 fastfetch --load-config all --show-errors --stat --multithreading false --disable-linewrap false --hide-cursor false                        ✔
                  -`                     -------@archlinux                                                                                                         0ms
                 .o+`                    ---------------------                                                                                                         3ms
                `ooo/                    OS: Arch Linux x86_64                                                                                                         0ms
               `+oooo:                   Host: 81S9 (Lenovo IdeaPad S145-15IWL)                                                                                        0ms
              `+oooooo:                  Bios (UEFI): ASCN50WW (1.50)                                                                                                  0ms
              -+oooooo+:                 Board: LNVNB161216 (SDK0J40688 WIN)                                                                                           0ms
            `/:-:++oooo+:                Chassis: Notebook (Lenovo IdeaPad S145-15IWL)                                                                                 0ms
           `/++++/+++++++:               Kernel: 6.6.4-arch1-1                                                                                                         0ms
          `/++++++++++++++:              Uptime: 7 mins                                                                                                                0ms
         `/+++ooooooooooooo/`            Processes: 293                                                                                                                0ms
        ./ooosssso++osssssso+`           Packages: 1924 (pacman), 86 (flatpak)                                                                                         4ms
       .oossssso-````/ossssss+`          Shell: zsh 5.9                                                                                                                1ms
      -osssssso.      :ssssssso.         Display (AUO61ED): 1920x1080 @ 60Hz [Built-in]                                                                                1ms
     :osssssss/        osssso+++.        Brightness (AUO61ED): 100%                                                                                                    1ms
    /ossssssss/        +ssssooo/-        Monitor (AUO61ED): 1920x1080 px - 344x194 mm (15,55 inches, 141,68 ppi)                                                       0ms
  `/ossssso+/:-        -:/+osssso+-      LM: gdm-password 45.0.1 (Wayland)                                                                                             3ms
 `+sso+:-`                 `.-/+oso:     DE: Gnome 45.2                                                                                                                1ms
`++:.                           `-/+/    WM: Mutter (Wayland)                                                                                                          0ms
.`                                 `/    WM Theme: Adwaita-dark                                                                                                        1ms
                                         Theme: Adwaita-dark [GTK2/3/4]                                                                                                0ms
                                         Icons: Adwaita [GTK2/3/4]                                                                                                     0ms
                                         Font: NotoSans Nerd Font (12pt) [GTK2/3/4]                                                                                    0ms
                                         Cursor: Adwaita (24px)                                                                                                        0ms
                                         Wallpaper: 2023-11-28-17-35-53-wallhaven-gp1ym3.png                                                                           0ms
                                         Terminal: tmux 3.3a                                                                                                           0ms
                                         Terminal Font: Unknown terminal: tmux: server                                                                                 0ms
                                         Terminal Size: 171 columns x 36 rows (1881px x 972px)                                                                         0ms
                                         CPU: Intel(R) Core(TM) i7-8565U (8) @ 4,60 GHz                                                                                0ms
                                         CPU Usage: 31%                                                                                                                0ms
                                         GPU 1: Intel UHD Graphics 620
                                         GPU 2: NVIDIA GeForce MX110                                                                                                   7ms
                                         Memory: 3,54 GiB / 19,29 GiB (18%)                                                                                            0ms
                                         Swap: 0 B / 9,65 GiB (0%)                                                                                                     0ms
                                         Disk (/): 76,71 GiB / 114,44 GiB (67%) - ext4
                                         Disk (/mnt/nvme0n1p1): 73,32 GiB / 265,53 GiB (28%) - ext4                                                                    0ms
                                         Battery: 60% [Not charging]                                                                                                   0ms
                                         Power Adapter: Not supported on this platform                                                                                 0ms
                                         Media Player: No media found                                                                                                  2ms
                                         Media: No media found                                                                                                         0ms
                                         Public IP: ---.--.--.-- (---------, ---)                                                                                    181ms
                                         Local IP (wlan0): 192.168.1.7/24 *                                                                                            0ms
                                         Wifi: ---- -- - 802.11ac (Wi-Fi 5) - WPA2                                                                                    20ms
                                         Date & Time: 2023-12-07 09:53:00                                                                                              0ms
                                         Locale: pt_BR.UTF-8                                                                                                           0ms
                                         Vulkan: 1.3.260 - NVIDIA [545.29.06]                                                                                        137ms
                                         OpenGL: 4.6 (Compatibility Profile) Mesa 23.2.1-arch1.2                                                                      77ms
                                         OpenCL: 3.0 CUDA                                                                                                            296ms
                                         Users: ---------@login screen - login time 2023-12-07T09:45:32-0300                                                         0ms
                                         Bluetooth: No bluetooth devices found                                                                                         1ms
                                         Sound: HyperX Cloud Stinger Equalizer Sink (29%)                                                                              4ms
                                         Gamepad: No devices detected                                                                                                  0ms
                                         Weather: +27°C - Sunny (--------, ------)                                                                                1261ms
                                         Network IO (wlan0): 1,06 KiB/s (IN) - 1,05 KiB/s (OUT)                                                                        0ms
                                         Disk IO (CT240BX500SSD1 1905E170253F): 49,46 MiB/s (R) - 60,00 KiB/s (W)
                                         Disk IO (INTEL SSDPEKNW512G8L PHNH9283090E512A 1): 0 B/s (R) - 0 B/s (W)                                                      0ms
                                         Version: fastfetch 2.3.3 (x86_64)
$ fastfetch --list-features                                                                                                                                   ✔
threads
libpci
vulkan
wayland
xcb-randr
xcb
xrandr
x11
drm
gio
dconf
dbus
imagemagick7
chafa
zlib
xfconf
egl
glx
osmesa
opencl
libpulse
libnm
libddcutil
Directx Headers

image with my use of fastfetch: https://imgur.com/a/QlCFZJO

@henriqueffc henriqueffc added the bug Something isn't working label Dec 7, 2023
@henriqueffc henriqueffc changed the title fastfetch --help command is not working in version 2.3.3 fastfetch --help command is incomplete in version 2.3.3 Dec 7, 2023
@CarterLi
Copy link
Member

CarterLi commented Dec 7, 2023

Hello Robin @Antiz96

After 3 patch versions, I'm still unable to fix this issue. I have tried build it locally with the PKGBUILD that Arch repo uses but unable to reproduce it.

It may be because python3 is not available, or python failed to find the help.json file. Can you please try adding python3 to build dependency explicitly and patching the source file with

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 20a65e01..57d50076 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -221,12 +221,15 @@ endfunction(fastfetch_load_text)
 
 find_package(Python)
 if(Python_FOUND)
-    # Minify JSON string. `io.open(0,encoding='utf-8')` is needed to avoid encoding issues on Windows
     execute_process(COMMAND ${Python_EXECUTABLE} -c "import json,sys;json.dump(json.load(sys.stdin),sys.stdout,separators=(',',':'))"
-                    INPUT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/src/data/help.json"
+                    INPUT_FILE "${CMAKE_SOURCE_DIR}/src/data/help.json"
                     OUTPUT_VARIABLE DATATEXT_JSON_HELP)
+    if(DATATEXT_JSON_HELP STREQUAL "")
+        message(ERROR "DATATEXT_JSON_HELP is empty, which should not happen!")
+    endif()
 else()
-    file(READ "src/data/help.json" TEMP)
+    message(STATUS "Python3 is not found, 'help.json' will not be minified")
+    file(READ "src/data/help.json" DATATEXT_JSON_HELP)
 endif()
 
 fastfetch_encode_c_string("${DATATEXT_JSON_HELP}" DATATEXT_JSON_HELP)

and see if it can resolve the issue?

If everything is normal, fastfetch --help should print like this:

image

Thanks in advance.

@Antiz96
Copy link

Antiz96 commented Dec 7, 2023

Hi @CarterLi,

Having python installed at build time fixed the issue. Thanks for the hint!

@henriqueffc I uploaded v2.3.3-2 in [extra-testing] as a fix (the package can also be downloaded here). Can you confirm it solves the issue for you too?

Thanks :)

@CarterLi
Copy link
Member

CarterLi commented Dec 7, 2023

I can confirm the fix in v2.3.3-2

Thanks for help!

@ceamac
Copy link
Contributor

ceamac commented Dec 7, 2023

I think it's from here

Replacing it with file(READ "src/data/help.json" DATATEXT_JSON_HELP) should fix the build even when Python is not found.

@Antiz96
Copy link

Antiz96 commented Dec 7, 2023

I think it's from here

Replacing it with file(READ "src/data/help.json" DATATEXT_JSON_HELP) should fix the build even when Python is not found.

I was about to modify the Dependencies wiki page to add that python is required at build time for the help message, but I'll wait for @CarterLi input on the above before doing so :)

@CarterLi
Copy link
Member

CarterLi commented Dec 7, 2023

I think it's from here

Replacing it with file(READ "src/data/help.json" DATATEXT_JSON_HELP) should fix the build even when Python is not found.

You are right. It was my mistake.

@CarterLi
Copy link
Member

CarterLi commented Dec 7, 2023

Another hotfix release will be cut soon. I'm sorry for this issue.

@CarterLi CarterLi closed this as completed Dec 7, 2023
@henriqueffc
Copy link
Author

henriqueffc commented Dec 7, 2023

Hi @CarterLi,

Having python installed at build time fixed the issue. Thanks for the hint!

@henriqueffc I uploaded v2.3.3-2 in [extra-testing] as a fix (the package can also be downloaded here). Can you confirm it solves the issue for you too?

Thanks :)

I apologize, I didn't have time to test v2.3.3-2, but v2.3.4-1 is working perfectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants