-
Notifications
You must be signed in to change notification settings - Fork 386
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
[RFC] Replace package manager URL from yazi-rs/plugins#full-border
to yazi-rs/plugins:full-border
#1471
Comments
Pinging @GianniBYoung @pirafrank @uncenter for their wisdom |
I think supporting a specific few Git host URL patterns is feasable, which would allow supporting plugins on different branches as well as subdirectories. The two issues with that though are self hosted Git instances would be harder to deal with, and this doesn't solve the "shorthand" syntax. I'm not sure about using any symbols for the command- I'm a fan of |
I may agree to custom options, yet in addition to custom option to show in 'help', it is very common to have a short syntax with a URL-like reference for widely used Git hosting platforms as GitHub and GitLab. owner/repo:some/subdir with .yazi still omitted. And I agree that such reference should also take into account a branch different then the default one, it may become: owner/repo@feature/non-default-branch:some/subdir with |
I think This could lead to various combinations, such as:
This also wouldn't be easy to implement; we'd need to find a way to enable the ❯ ya pack --help
Manage packages
Usage: ya pack [OPTIONS]
Options:
-a, --add <ADD> Add a package
-i, --install Install all packages
-l, --list List all packages
-u, --upgrade Upgrade all packages
-h, --help Print help |
Are
|
They should work across many shells, the same way SSH commands do.
Second option, imo. I'd always mark the start of subpath with
|
Nice! Yazi has already restricted plugin names to only include letters and hyphens, which makes handling them much easier, we can safely extract everything after the Thank you so much for your input. I think this could be the final solution, as long as no other issues come up during implementation. I'll try to implement the |
Sounds good to me as well! |
yazi-rs/plugins#full-border
to yazi-rs/plugins/full-border
yazi-rs/plugins#full-border
to yazi-rs/plugins:full-border
Throwing in my two cents; I like the simplicity of using |
Should we maybe open a new tracking issue for adding support for branches? I see that you renamed |
Hi @uncenter, yes option to express a branch name to checkout was part of the efforts of this RFC. You can read it's mentioned in comments above with the |
Well aware, I was the first respondent to this RFC! My question is this issue is now closed but I don't think branch support was added? |
Sorry then, it's me missing the point. I looked at the code and your PR hasn't been merged. I guess that's a make-or-break question only @sxyazi can answer. |
My PR didn't add branch support, it added arbitrary Git forge/host support. Both would be great but at the minute we have neither. |
No, this RFC doesn't cover adding branch support; it only addresses the issue of The RFC does mention that
I've only implemented the part with |
I'm going to lock this issue because it has been closed for 30 days. ⏳ |
To make plugin maintenance easier, Yazi's package manager supports monorepos — where multiple smaller plugins are distributed within the same Git repository. For this reason, the
#
symbol was introduced to identify subdirectories within the repo, such asyazi-rs/plugins#full-border
, which corresponds to https://github.com/yazi-rs/plugins/tree/main/full-border.yazi.However, since the release of Yazi 0.3, we've received several reports ([1], [2]) from users over the past few days that
#
is treated as a special character in their shell, which requires escaping. This is often due to certain plugins being enabled.As a result,
ya pack -a yazi-rs/plugins#full-border
has to be written asya pack -a "yazi-rs/plugins#full-border"
, which conflicts with the simple design philosophy ofya pack
.When users are typing commands rather than copying them, they would need to manually add quotation marks, and this also necessitates that all community plugin READMEs properly escape these characters. Otherwise, users might face inconvenience when trying to install the plugins. This RFC aims to permanently address this issue before
ya pack
becomes more widely used.Therefore, this RFC proposes finding another symbol to replace it. Currently,
/
seems to be a strong alternative. However, this might conflict with PR #1325, which would allow users to use arbitrary URLs, such as:ya pack -a https://gitlab.com/<owner>/<repo>
.The concern here is that we cannot guarantee that all Git providers use this two-level URL structure, for example something like
ya pack -a https://my-awesome-domain.com/web/<owner>/<repo>
might be recognized as a subdirectory under the repo rather than the repo itself, this was the original reason for choosing#
, as it is not an essential part of the URL but rather used by browsers as an anchor, meaning we can safely ignore it.The text was updated successfully, but these errors were encountered: