mirror of https://github.com/jorgebucaran/fisher
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.
20 lines
414 B
Fish
20 lines
414 B
Fish
function __fisher_file -a file -d "Read a fishfile and display its contents"
|
|
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)
|
|
}
|
|
' $file
|
|
end
|