pkg info -q -a gives a list of all installed packages, without descriptions (correct) pkg info bash gives full info for whichever version of bash is installed pkg info -q bash shows nothing it should show full version of installed package, as in the -1 -a output
pkg info -q can used like pkg info -q > packagelist.txt.
I am reopening this because: pkg help info shows: pkg info [-AbBDdefIklOpqRrs] [-Cgix] pkg-name That means one should be able to give: pkg info -q bash or pkg info -q bash-4.4.23_1 Neither of which works. While one can clearly do pkg info -q | grep bash to get the desired result, either the pkg command is not working as documented and needs fixing, or the documentation needs to be fixed to reflect how the command actually works.
It works in combination with other switches: pkg info -qo firefox www/firefox pkg info -qR firefox displays the full Manifest pkg info -qf firefox the normal pkg info firefox output
> It works in combination with other switches: > > pkg info -qo firefox > www/firefox In that case, it *should* work by itself, as documented. It seems rather bizarre behavior in terms of code to have it work in combination with other flags with a filename argument, but not alone; yet work alone with no filename argument. It looks to me like the query_flags will be empty with only -q present, as it is taken out with the "quiet" flag, and pkgdb_it_next probably does not return EPKG_OK (about line 448 in info.c).