Compare commits

...

4 Commits

Author SHA1 Message Date
Clemens Wältken 51faa73930
Merge 74facc8a91 into 2efd33ccd0 2023-08-21 12:10:30 -07:00
Jorge Bucaran 2efd33ccd0
4.4.4 2023-08-22 02:57:10 +09:00
Vasyl Zuziak 4c95fd94c6
Ignore user's curlrc during download (#771)
By using the `-q` flag, we avoid issues from existing `.curlrc` settings, especially the `-O` option that sends output to disk instead of stdout. Since we use curl more as a plumbing tool than an interactive user command , ignoring `.curlrc` ensures consistent behavior across setups.
2023-08-22 02:56:10 +09:00
Clemens Wältken 74facc8a91
add codeberg.org support
Signed-off-by: Clemens Wältken <clemens@waeltken.de>
2022-09-06 11:58:42 +02:00
1 changed files with 5 additions and 2 deletions

View File

@ -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