fix: don't strip github.com from local paths; fix #472

This commit is contained in:
Joe George 2018-10-10 11:41:44 -04:00 committed by Jorge Bucaran
parent 1d82bee9c2
commit 28aaa277e0

View file

@ -349,7 +349,7 @@ end
function _fisher_fishfile_indent -a pkgs
command awk -v PWD=$PWD -v HOME=$HOME -v PKGS="$pkgs" '
function normalize(s) {
gsub(/^[ \t]*|[ \t]*$|https?:\/\/|github\.com\/|\.git$|\/$/, "", s)
gsub(/^[ \t]*|[ \t]*$|https?:\/\/|^[ \t]*github\.com\/|\.git$|\/$/, "", s)
sub(/^\.\//, PWD"/", s)
sub(HOME, "~", s)
return s