mirror of https://github.com/jorgebucaran/fisher
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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
|