-
Notifications
You must be signed in to change notification settings - Fork 640
Description
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 as yazi-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 as ya pack -a "yazi-rs/plugins#full-border", which conflicts with the simple design philosophy of ya 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.