Add GitLab support (#658)

Close #658.
pull/722/head
Jorge Bucaran 2 years ago
commit daddbadb79
No known key found for this signature in database
GPG Key ID: E54BA3C0E646DB30

@ -29,6 +29,8 @@ Install plugins using the `install` command followed by the path to the reposito
fisher install jorgebucaran/nvm.fish
```
> To install a plugin from GitLab, prefix the repository with `gitlab.com/`.
To get a specific version of a plugin add an `@` symbol after the plugin name followed by a tag, branch, or [commit](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefcommit-ishacommit-ishalsocommittish).
```console

@ -91,6 +91,12 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
set url https://api.github.com/repos/\$name[1]/tarball/\$name[2]
set header 'Accept: application/vnd.github.v3+json'
if string match -q 'gitlab.com/*' \$name[1]
set bare (string replace 'gitlab.com/' '' \$name[1])
set repo (string split '/' \$bare)
set url https://gitlab.com/{\$bare}/-/archive/{\$name[2]}/{\$repo[2]}-{\$name[2]}.tar.gz
end
echo Fetching (set_color --underline)\$url(set_color normal)
if curl --silent -L -H \$header \$url | tar -xzC \$temp -f - 2>/dev/null

Loading…
Cancel
Save