Update fisher.fish to support codeberg.org

pull/780/head
Shea690901 7 months ago committed by GitHub
parent 2efd33ccd0
commit d209d1204c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -92,6 +92,13 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
if set path (string replace --regex -- '^(https://)?gitlab.com/' '' \$repo[1])
set name (string split -- / \$path)[-1]
set url https://gitlab.com/\$path/-/archive/\$repo[2]/\$name-\$repo[2].tar.gz
else if set path (string replace --regex -- '^(https://)?codeberg.org/' '' \$repo[1])
set name (string split -- / \$path)[-1]
if test \$repo[2] = HEAD
set url https://codeberg.org/\$path/archive/main.tar.gz
else
set url https://codeberg.org/\$path/archive/\$repo[2].tar.gz
end
else
set url https://api.github.com/repos/\$repo[1]/tarball/\$repo[2]
end

Loading…
Cancel
Save