mirror of
https://github.com/jorgebucaran/fisher
synced 2024-10-09 09:36:53 +02:00
Merge pull request #372 from fisherman/issue-371
Prevent additional remotes per plugin from affecting fishfile
This commit is contained in:
commit
91f447ec40
1 changed files with 20 additions and 18 deletions
12
fisher.fish
12
fisher.fish
|
@ -1644,12 +1644,13 @@ function __fisher_plugin_get_url_info -a option
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
command cat {$argv}/.git/config ^ /dev/null | command awk -v option="$option" '
|
for dir in $argv
|
||||||
/url/ {
|
git -C $dir config remote.origin.url ^ /dev/null | command awk -v option="$option" '
|
||||||
n = split($3, s, "/")
|
{
|
||||||
|
n = split($0, s, "/")
|
||||||
|
|
||||||
if ($3 ~ /https:\/\/gist/) {
|
if ($0 ~ /https:\/\/gist/) {
|
||||||
printf("# %s\n", $3)
|
printf("# %s\n", $0)
|
||||||
next
|
next
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1665,6 +1666,7 @@ function __fisher_plugin_get_url_info -a option
|
||||||
}
|
}
|
||||||
'
|
'
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
function __fisher_plugin_normalize_path
|
function __fisher_plugin_normalize_path
|
||||||
|
|
Loading…
Reference in a new issue