mirror of https://github.com/jorgebucaran/fisher
Compare commits
4 Commits
2156f64f9e
...
51faa73930
Author | SHA1 | Date |
---|---|---|
Clemens Wältken | 51faa73930 | |
Jorge Bucaran | 2efd33ccd0 | |
Vasyl Zuziak | 4c95fd94c6 | |
Clemens Wältken | 74facc8a91 |
|
@ -1,6 +1,6 @@
|
|||
function fisher --argument-names cmd --description "A plugin manager for Fish"
|
||||
set --query fisher_path || set --local fisher_path $__fish_config_dir
|
||||
set --local fisher_version 4.4.3
|
||||
set --local fisher_version 4.4.4
|
||||
set --local fish_plugins $__fish_config_dir/fish_plugins
|
||||
|
||||
switch "$cmd"
|
||||
|
@ -92,13 +92,16 @@ 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 repo (string split -- \@ $plugin) || set repo[2] main
|
||||
set url https://codeberg.org/\$path/archive/\$repo[2].tar.gz
|
||||
else
|
||||
set url https://api.github.com/repos/\$repo[1]/tarball/\$repo[2]
|
||||
end
|
||||
|
||||
echo Fetching (set_color --underline)\$url(set_color normal)
|
||||
|
||||
if command curl --silent -L \$url | command tar -xzC \$temp -f - 2>/dev/null
|
||||
if command curl -q --silent -L \$url | command tar -xzC \$temp -f - 2>/dev/null
|
||||
command cp -Rf \$temp/*/* $source
|
||||
else
|
||||
echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2
|
||||
|
|
Loading…
Reference in New Issue