fix: don't expect https:// to start lines in fishfile

This commit is contained in:
Jorge Bucaran 2018-10-08 10:23:44 +09:00
parent 2549ac1f4b
commit 4e7c9e000b
No known key found for this signature in database
GPG key ID: E54BA3C0E646DB30

View file

@ -353,7 +353,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?:\/\/|github\.com\/|\.git$|\/$/, "", s)
sub(/^\.\//, PWD"/", s)
sub(HOME, "~", s)
return s