Closed ainmosni closed 2 years ago
We could if it's not a lot of work. Do you want to send a PR?
Here is where we set the URL before attempting to curl-download it.
Yeah I already found that, what would the preferred syntax be? To keep the rest of the logic intact, I could go gitlab specific and make it gitlab:user/repo
, and then someone else can add more generic support later.
fisher used to have gitlab.com/user/repo
before iirc.
That's also fine, I have no strong feelings tbh.
gitlab.com/user/repo
would be the least surprising way to go about this IMO.
Something like this might do it. All the escaping is because we happen to calculate the URL inside the background job. 🤖
switch $plugin
case gitlab\\*
set url https://\$name[1]/-/archive/\$name[2]/(string replace --all --regex -- '^.*/' '' \$name[1])-\$name[2].tar.gz
case \\*
set url https://codeload.github.com/\$name[1]/tar.gz/\$name[2]
end
@jorgebucaran I went a bit different, and yeah the escaping broke my head for a bit. :)
Just to let you know that this is still on my radar. I am just letting it cook for a while.
While you at it, why not to add support for fetching arbitrary tar.gz? This would enable users to use any code hosting (as long it allows downloading branch as tarball). So Sourcehut, Gitea, HTTP server running on the toaster etc. would be supported.
Never mind, I'll open a separate issue.
I upgraded Fisher without knowing about this change, and now it's essentially become useless for me, unfortunately. Wish it would've been noted in the changelog. Is there an easy way to revert to an older version?
Edit: Reverting to the old installation method of downloading fisher.fish
directly (from a 3.x
tag) worked fine.
Wish it would've been noted in the changelog
I'm considering to bring it back. Maybe you can help by trying out #658.
Ah, I completely missed it because it was (a bit unusually) shortened to "GL/BB". In any case, version 3.3.2
works just fine for now.
I'll try out the branch in #658 when I get around to it; thanks for the pointer.
Right now, install tries to use
codeload.github.com
to fetch any non-local package. This makes it impossible for fisher to install plugins from GitLab or any other hosts. I found #337, which indicates that gitlab was supported at one point, can support for gitlab (and potentially other hosts) be restored?