feat: feature – support miligrams – appimage compressed plugins #554
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.
Description
This is the first commit that introduces the miligrams support via new, embedded (shipped and loaded by default)
mg
annex. In this commit what's implemented is:zi for my-plugin.mg
syntax, with a variation ofzi mg for my-plugin
,keep
ice (i.e.:zi keep for my-plugin.mg
),xmg
, that can build the miligram (viazi xmg build
in the plugin dir), and also:zi xmg extract my-plugin
).What's left is only allowing download of the miligrams from the GitHub Releases page. The planned syntax for this is:
zi mg"user/repo" for my-plugin
, that would look into the binary files and look up the most recent version ofmy-plugin.mg
, like e.g.:my-plugin-v1.7.mg
. The code already looks up the most recent version of the package, sozi for my-plugin.mg
will loadmy-plugin-1.7.mg
if it's the most recent version.Related Issue(s)
#553
Motivation and Context
I think that to have the plugins like eggs in python is a good update on the plugins in Zsh world. We can exploit the already existing, well spread and supported AppImages' features, like:
appimagetool
,…to provide an
egg
like solution to Zsh.I've implemented the feature as annex that's shipped with zinit. It's located in
zinit.git/lib/annex/mg
and is automatically loaded at end ofzinit.zsh
. It is abefore-load
hook, likeunscope
annex.Usage examples
How Has This Been Tested?
By interactive use.
Types of changes
Checklist: