From 45b960a6f5f9a197fd33fa65454260d0148b42de Mon Sep 17 00:00:00 2001 From: jkh Date: Tue, 27 Apr 1999 02:30:27 +0000 Subject: [PATCH] If pkg_info is run with no args, default to "-aI". --- usr.sbin/pkg_install/info/main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/usr.sbin/pkg_install/info/main.c b/usr.sbin/pkg_install/info/main.c index a01eeebde8dd..cd28bd2dafdf 100644 --- a/usr.sbin/pkg_install/info/main.c +++ b/usr.sbin/pkg_install/info/main.c @@ -1,6 +1,6 @@ #ifndef lint static const char rcsid[] = - "$Id: main.c,v 1.14 1997/10/08 07:47:26 charnier Exp $"; + "$Id: main.c,v 1.15 1997/12/26 05:29:29 hoek Exp $"; #endif /* @@ -46,7 +46,11 @@ main(int argc, char **argv) char **pkgs, **start; pkgs = start = argv; - while ((ch = getopt(argc, argv, Options)) != -1) + if (argc == 1) { + AllInstalled = TRUE; + Flags = SHOW_INDEX; + } + else while ((ch = getopt(argc, argv, Options)) != -1) { switch(ch) { case 'a': AllInstalled = TRUE; @@ -129,6 +133,7 @@ main(int argc, char **argv) usage(); break; } + } argc -= optind; argv += optind;