An indirect way to accomplish this, for example. for packagetext
cabal list --simple-output text | awk '$1=="text" { print $2 }'
Post-processing through is awknecessary because it cabal listcurrently only supports a substring, but not an exact match.
source
share