fisher/functions/__fisher_file.fish
2016-02-04 13:56:06 +09:00

20 lines
443 B
Fish

function __fisher_file
awk '
/^[ \t]*(package|theme) .+/ {
if ($1 == "package") {
$1 = "https://github.com/oh-my-fish/plugin-"$2
} else {
$1 = "https://github.com/oh-my-fish/theme-"$2
}
}
!/^[ \t]*(#.*)*$/ {
gsub("^[|*>]|#.*", "")
if (! seen[$1]++) {
printf("%s\n", $1)
}
}
'
end