From 211fbc439442169315739837a03a8a12528f1b10 Mon Sep 17 00:00:00 2001 From: Landry Breuil Date: Mon, 7 Sep 2009 20:39:56 +0000 Subject: Don't print package comment when -q is given, and no other option is used. This way, pkg_info -q only shows installed pkgnames.. and can replace `ls /var/db/pkg` in scripts. ok espie@ --- usr.sbin/pkg_add/pkg_info | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/pkg_add/pkg_info b/usr.sbin/pkg_add/pkg_info index 04f3aba03ad..b236f90a52c 100644 --- a/usr.sbin/pkg_add/pkg_info +++ b/usr.sbin/pkg_add/pkg_info @@ -1,6 +1,6 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_info,v 1.73 2009/04/19 14:58:32 espie Exp $ +# $OpenBSD: pkg_info,v 1.74 2009/09/07 20:39:55 landry Exp $ # # Copyright (c) 2003-2007 Marc Espie # @@ -252,7 +252,9 @@ sub print_info if ($opt_I) { my $l = 20 - length($pkg); $l = 1 if $l <= 0; - print $pkg, " "x$l, get_comment($handle->info), "\n"; + print $pkg; + print " "x$l, get_comment($handle->info) unless $opt_q; + print "\n"; } else { my $done = 0; if ($opt_c) { -- cgit v1.2.3