mirror of
https://github.com/jorgebucaran/fisher
synced 2024-07-02 23:11:48 +02:00
refactor: use id
to refer to package name specifier, not name
This commit is contained in:
parent
993b471777
commit
44ec48b472
14
fisher.fish
14
fisher.fish
|
@ -193,25 +193,25 @@ function _fisher_pkg_fetch_all
|
||||||
set -l actual_pkgs
|
set -l actual_pkgs
|
||||||
set -l expected_pkgs
|
set -l expected_pkgs
|
||||||
|
|
||||||
for name in $argv
|
for id in $argv
|
||||||
switch $name
|
switch $id
|
||||||
case \~\* /\*
|
case \~\* /\*
|
||||||
set -l path (echo "$name" | command sed "s|~|$HOME|")
|
set -l path (echo "$id" | command sed "s|~|$HOME|")
|
||||||
if test -e "$path"
|
if test -e "$path"
|
||||||
set local_pkgs $local_pkgs $path
|
set local_pkgs $local_pkgs $path
|
||||||
else
|
else
|
||||||
echo "cannot install \"$name\" -- is this a valid file?" >&2
|
echo "cannot install \"$id\" -- is this a valid file?" >&2
|
||||||
end
|
end
|
||||||
continue
|
continue
|
||||||
case https://\* ssh://\* {github,gitlab}.com/\* bitbucket.org/\*
|
case https://\* ssh://\* {github,gitlab}.com/\* bitbucket.org/\*
|
||||||
case \*/\*
|
case \*/\*
|
||||||
set name "github.com/$name"
|
set id "github.com/$id"
|
||||||
case \*
|
case \*
|
||||||
echo "cannot install \"$name\" without a prefix -- should be <owner>/$name" >&2
|
echo "cannot install \"$id\" without a prefix -- should be <owner>/$id" >&2
|
||||||
continue
|
continue
|
||||||
end
|
end
|
||||||
|
|
||||||
echo $name | command awk '{
|
echo $id | command awk '{
|
||||||
split($0, tmp, /@/)
|
split($0, tmp, /@/)
|
||||||
|
|
||||||
pkg = tmp[1]
|
pkg = tmp[1]
|
||||||
|
|
Loading…
Reference in a new issue