You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
fisher/functions/__fisher_file.fish

20 lines
378 B
Fish

function __fisher_file -a file -d "Read a fishfiles"
switch "$file"
case ""
set file $fisher_config/fishfile
case "-"
set file /dev/stdin
end
awk '
!/^ *(#.*)*$/ {
gsub("#.*", "")
if (/^ *package .+/) $1 = $2
if (!duplicates[$1]++) printf("%s\n", $1)
}
' $argv
end