diff options
author | jkh <jkh@FreeBSD.org> | 1999-04-27 02:30:27 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1999-04-27 02:30:27 +0000 |
commit | 45b960a6f5f9a197fd33fa65454260d0148b42de (patch) | |
tree | 0b968111a6fe9225da18bcc079e3ead5eaacb181 /usr.sbin | |
parent | f768143bcbe1b88f2316e3b88ba9246ec710d667 (diff) | |
download | FreeBSD-src-45b960a6f5f9a197fd33fa65454260d0148b42de.zip FreeBSD-src-45b960a6f5f9a197fd33fa65454260d0148b42de.tar.gz |
If pkg_info is run with no args, default to "-aI".
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_install/info/main.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/pkg_install/info/main.c b/usr.sbin/pkg_install/info/main.c index a01eeeb..cd28bd2 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; |