feat: add some dependency version information to yazi --debug
#1112
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1104
I made it so that it would print Nill if the user doesn't have that dependency and the version otherwise
Here is a sample output after changes:
Yazi
Version: 0.2.5 (0b2089b 2024-06-02)
OS: linux-x86_64 (unix)
Debug: true
Ya
Version: Ok("ya 0.2.5\n")
Emulator
Emulator.via_env: ("alacritty", "")
Emulator.via_csi: Ok(Unknown([]))
Emulator.detect: Unknown([])
Adaptor
Adaptor.matches: X11
Desktop
XDG_SESSION_TYPE: Some("x11")
WAYLAND_DISPLAY: None
DISPLAY: Some(":0")
SSH
shared.in_ssh_connection: false
WSL
/proc/sys/fs/binfmt_misc/WSLInterop: false
Variables
SHELL: Some("/usr/bin/zsh")
EDITOR: Some("nvim")
ZELLIJ_SESSION_NAME: None
YAZI_FILE_ONE: None
YAZI_CONFIG_HOME: None
file(1)
Version: Ok("file-5.45\nmagic file from /usr/share/file/misc/magic\nseccomp support included\n")
Text Opener
default: Some(Opener { run: "${EDITOR:=vi} "$@"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
block: Some(Opener { run: "${EDITOR:=vi} "$@"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
tmux
TMUX: false
Dependencies Versions
ffmpegthumbnailer
Version: Ok("ffmpegthumbnailer version: 2.2.2\n")
Ueberzug++
Version: Ok("Nill")
unar
Version: Ok("v1.10.7\n")
jq
Version: Ok("jq-1.7.1\n")
fd
Version: Ok("fd 8.7.0\n")
rg
Version: Ok("ripgrep 14.1.0\n\nfeatures:-simd-accel,+pcre2\nsimd(compile):+SSE2,-SSSE3,-AVX2\nsimd(runtime):+SSE2,+SSSE3,+AVX2\n\nPCRE2 10.42 is available (JIT is available)\n")
fzf
Version: Ok("0.52.0 (bcda25a5)\n")
zoxide
Version: Ok("zoxide 0.9.4\n")
chafa
Version: Ok("Chafa version 1.14.0\n\nLoaders: AVIF GIF JPEG PNG QOI SVG TIFF WebP XWD\nFeatures: mmx sse4.1 popcnt avx2\nApplying: mmx sse4.1 popcnt avx2\n\nCopyright (C) 2018-2023 Hans Petter Jansson et al.\nIncl. libnsgif copyright (C) 2004 Richard Wilson, copyright (C) 2008 Sean Fox\nIncl. LodePNG copyright (C) 2005-2018 Lode Vandevenne\nIncl. QOI decoder copyright (C) 2021 Dominic Szablewski\n\nThis is free software; see the source for copying conditions. There is NO\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n")
tmux
Version: Ok("tmux 3.4\n")