fisher/functions/__fisher_file.fish
2016-03-08 22:16:59 +09:00

22 lines
449 B
Fish

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