mirror of
https://github.com/jorgebucaran/fisher
synced 2024-10-09 09:36:53 +02:00
21 lines
619 B
Fish
21 lines
619 B
Fish
|
function __fisher_cache -d "Calculate path of a name, url or path relative to the cache"
|
||
|
while read --prompt="" -l item
|
||
|
switch "$item"
|
||
|
case file:///\*
|
||
|
printf "%s\n" $item
|
||
|
|
||
|
case \*/\*
|
||
|
for file in $fisher_cache/*
|
||
|
switch "$item"
|
||
|
case (git -C $file ls-remote --get-url | __fisher_validate)
|
||
|
printf "%s\n" $file
|
||
|
break
|
||
|
end
|
||
|
end
|
||
|
|
||
|
case \*
|
||
|
printf "%s\n" $fisher_cache/$item
|
||
|
end
|
||
|
end
|
||
|
end
|