Include tags in 'ghcup list' and improve formatting

This commit is contained in:
Julian Ospald 2018-11-06 22:01:02 +08:00
parent 5eee1b6d58
commit 2b9f1a4a20
No known key found for this signature in database
GPG Key ID: 511B62C09D50CD28

8
ghcup
View File

@ -1562,14 +1562,18 @@ list() {
awk " awk "
NF { NF {
if (\$1 != \"#\") { if (\$1 != \"#\") {
print \$1 \" \" \$2 if (\$1 == \"cabal-install\") {
print \$1 \"\\t\" \$2 \"\\t\" \$3
} else {
print \$1 \"\\t\\t\" \$2 \"\\t\" \$3
}
} }
}" "${meta_file}" || die "awk failed!" }" "${meta_file}" || die "awk failed!"
else else
awk " awk "
NF { NF {
if (\$1 == \"${mytool}\") { if (\$1 == \"${mytool}\") {
print \$1 \" \" \$2 print \$1 \"\\t\" \$2 \"\\t\" \$3
} }
}" "${meta_file}" || die "awk failed!" }" "${meta_file}" || die "awk failed!"
fi fi