-
Notifications
You must be signed in to change notification settings - Fork 385
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
Binary name detection for dependencies #1697
Comments
No,
Also IIRC, Please make sure you're using the latest version of ImageMagick.
After a quick check, you're absolutely right - some systems call Would you like to raise a PR for it? Here's the code: yazi/yazi-plugin/src/external/fd.rs Lines 14 to 17 in 3e4973d
|
|
Oh I see this in version 7. They still have version 6 in the repository. ❯ docker run --rm -it ubuntu:24.10
root@6b10945cccb4:/# apt update -qq && apt install imagemagick -y -qq
root@6b10945cccb4:/# magick
bash: magick: command not found
root@6b10945cccb4:/# convert
Version: ImageMagick 6.9.13-12 Q16 x86_64 18420 https://legacy.imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP(4.5)
Delegates (built-in): bzlib djvu fftw fontconfig freetype heic jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png raw tiff webp wmf x xml zlib
Usage: convert-im6.q16 [options ...] file [ [options ...] file ...] [options ...] file
... Do you think it's not worth creating an option to override the utility name and simply try known names in the code instead? There also an option to override |
Yazi aims for maximum automation; it should be out-of-box, not reliant on user config. According to the fd doc, there are only two possible names:
No, this means user config is necessary, while it should be automatic. The role of the |
Done in #1889, thank you @Integral-Tech ! |
yazi --debug
outputPlease describe the problem you're trying to solve
While installing and configuring Yazi on Ubuntu, I noticed that Yazi doesn't recognize the installed ImageMagick and fd packages on my system. The issue is that APT provides binaries with different names. For ImageMagick, Yazi expects the binary to be called
magick
, but on Ubuntu, it's calledconvert
. Similarly,fd
is namedfdfind
.After briefly checking Yazi's source code, I found that hardcoded names are used for all utilities.
yazi/yazi-boot/src/actions/debug.rs
Lines 71 to 81 in 3e4973d
yazi/yazi-plugin/preset/plugins/magick.lua
Lines 22 to 33 in 3e4973d
This seems to be a common issue across various distributions and operating systems since program names don't always match.
Would you be willing to contribute this feature?
Describe the solution you'd like
Yazi should make its best effort to identify the correct binary name or allow plugin developers and users to configure it. There could be a registry for program names where developers and users can register the appropriate names for their systems.
For example, since dependency versions are printed in
debug.rs
, Yazi could come with a default registry:Then, plugin developers could add overrides like this:
Additionally, users could customize it for ad-hoc fixes:
This is just the first idea that came to mind.
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: