mirror of
https://github.com/jorgebucaran/fisher
synced 2024-06-28 23:01:50 +02:00
commit
daddbadb79
|
@ -29,6 +29,8 @@ Install plugins using the `install` command followed by the path to the reposito
|
||||||
fisher install jorgebucaran/nvm.fish
|
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).
|
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
|
```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 url https://api.github.com/repos/\$name[1]/tarball/\$name[2]
|
||||||
set header 'Accept: application/vnd.github.v3+json'
|
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)
|
echo Fetching (set_color --underline)\$url(set_color normal)
|
||||||
|
|
||||||
if curl --silent -L -H \$header \$url | tar -xzC \$temp -f - 2>/dev/null
|
if curl --silent -L -H \$header \$url | tar -xzC \$temp -f - 2>/dev/null
|
||||||
|
|
Loading…
Reference in a new issue