Index: PkgInfo.pm
===================================================================
RCS file: /cvs/src/usr.sbin/pkg_add/OpenBSD/PkgInfo.pm,v
retrieving revision 1.52
diff -u -p -r1.52 PkgInfo.pm
--- PkgInfo.pm	14 Jun 2023 09:59:09 -0000	1.52
+++ PkgInfo.pm	12 Nov 2023 01:54:01 -0000
@@ -494,7 +494,7 @@ sub handle_query($self, $state)
 
 	for my $pkg (sort {$a->name cmp $b->name} @$r) {
 		my $p = $pkg->name;
-		if ($state->hasanyopt('cdfMqs')) {
+		if ($state->hasanyopt('cdfIMqs')) {
 			$self->print_info($state, $p, $pkg);
 		} else {
 			$state->say(
@@ -573,9 +573,7 @@ sub parse_and_run($self, $cmd)
 
 	unless ($state->hasanyopt('cMUdfILRsSP') || $state->{terse}) {
 		if ($nonames) {
-			if ($state->opt('Q')) {
-				$state->setopts('I');
-			} else {
+			unless ($state->opt('Q')) {
 				$state->setopts('Ia');
 			}
 		} else {
