refactor: change regex to remove everything before a ***github.com/foo/bar

This commit is contained in:
Jorge Bucaran 2018-10-21 22:33:59 +09:00
parent b4c4023e16
commit aff893c05b
No known key found for this signature in database
GPG key ID: E54BA3C0E646DB30

View file

@ -407,7 +407,7 @@ function _fisher_fishfile_format -a pkgs
}
}
function normalize(s) {
gsub(/^[ \t]*(https?:\/\/)?(github\.com\/)?|[\/ \t]*$/, "", s)
gsub(/^[ \t]*(https?:\/\/)?(.*github\.com\/)?|[\/ \t]*$/, "", s)
sub(/^\.\//, PWD"/", s)
sub(HOME, "~", s)
return s