Compare commits

...

4 Commits

Author SHA1 Message Date
charego ddf54a65ab
Merge 93fbe34b74 into 2efd33ccd0 2023-08-22 03:21:21 +09: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
Charles Gould 93fbe34b74 Initialize _fisher_plugins using fish_plugins file (#741)
This change is for users who commit fish_plugins and plugin sources but
omit fish_variables. On a system where Fisher's universal variables are
unset, most Fisher commands were not working out-of-the-box:

* `fisher install <plugin>` - installs <plugin>, rewrites fish_plugins file with only <plugin>
                            - if <plugin> is in fish_plugins, same behavior as `fisher update`
* `fisher remove  <plugin>` - fails with error: Plugin not installed "<plugin>"
* `fisher update  <plugin>` - fails with error: Plugin not installed "<plugin>"
* `fisher update`           - fails with error about conflicting files, deletes fish_plugins file
* `fisher list   [<regex>]` - returns nothing

As of this commit all Fisher commands work except for `fisher remove`;
Fisher still has no way of knowing which files to remove absent the
universal variable that tracks the files associated to a plugin.

It may make sense to reject calls like `fisher remove <plugin>` if the
`_fisher_<plugin>_files` universal variable is missing. Fisher could
suggest the user run `fisher update` and try again.
2023-08-21 08:46:35 -04:00
1 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,9 @@
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
test -e $fish_plugins && set --local file_plugins (string match --regex -- '^[^\s]+$' <$fish_plugins)
set --query _fisher_plugins || set --universal _fisher_plugins $file_plugins
switch "$cmd"
case -v --version
@ -29,8 +31,6 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
set --local old_plugins $_fisher_plugins
set --local new_plugins
test -e $fish_plugins && set --local file_plugins (string match --regex -- '^[^\s]+$' <$fish_plugins)
if ! set --query argv[2]
if test "$cmd" != update
echo "fisher: Not enough arguments for command: \"$cmd\"" >&2 && return 1
@ -98,7 +98,7 @@ function fisher --argument-names cmd --description "A plugin manager for Fish"
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