diff options
author | gene <gene@cvs.openbsd.org> | 1997-12-14 09:18:09 +0000 |
---|---|---|
committer | gene <gene@cvs.openbsd.org> | 1997-12-14 09:18:09 +0000 |
commit | 5579cd14bfd9d5054651d7ff33f3ed15a442d881 (patch) | |
tree | d1f177d932472331a511f6014b1087e623247e01 /usr.sbin/pkg_install | |
parent | a4e7d4897bdc42704251fef7ecef41c196f3febf (diff) |
Inspired by changes in NetBSD but done a different way.
pkg_info by itself acts as if -a -I were given, and
when no flags are passed with package names, -I is implied.
Diffstat (limited to 'usr.sbin/pkg_install')
-rw-r--r-- | usr.sbin/pkg_install/info/main.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/usr.sbin/pkg_install/info/main.c b/usr.sbin/pkg_install/info/main.c index fe74c00801c..d692b772602 100644 --- a/usr.sbin/pkg_install/info/main.c +++ b/usr.sbin/pkg_install/info/main.c @@ -1,7 +1,7 @@ -/* $OpenBSD: main.c,v 1.4 1997/11/17 14:01:28 gene Exp $ */ +/* $OpenBSD: main.c,v 1.5 1997/12/14 09:18:08 gene Exp $ */ #ifndef lint -static char *rcsid = "$OpenBSD: main.c,v 1.4 1997/11/17 14:01:28 gene Exp $"; +static char *rcsid = "$OpenBSD: main.c,v 1.5 1997/12/14 09:18:08 gene Exp $"; #endif /* @@ -132,17 +132,16 @@ main(int argc, char **argv) argc -= optind; argv += optind; - /* Set some reasonable defaults */ - if (!Flags) - Flags = SHOW_COMMENT | SHOW_DESC | SHOW_REQBY; - /* Get all the remaining package names, if any */ while (*argv) *pkgs++ = *argv++; - /* If no packages, yelp */ - if (pkgs == start && !AllInstalled && !CheckPkg) - usage(prog_name, "Missing package name(s)"); + /* Set some reasonable defaults */ + if (!Flags) { + Flags |= SHOW_INDEX; + if (pkgs == start) + AllInstalled = TRUE; + } *pkgs = NULL; return pkg_perform(start); } |