Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
On second thoughts: '-e' for exact search is pointless, as exact is already the default.
Matthew Seaman committed 13 years ago
commit ee66c21be6af143d2b9feba14f71b2c2745325fa
parent aa3e9f3
2 files changed +9 -9
modified pkg/pkg-set.8
@@ -27,7 +27,7 @@
.Op Fl A Op Ar 01
.Op Fl o Ar <oldorigin>:<neworigin>
.Op Fl y
-
.Op Fl egx
+
.Op Fl gx
.Ar <pkg-name>
.Sh DESCRIPTION
.Nm
@@ -44,9 +44,6 @@ This affects the operation of
.Xr pkg-autoremove 8 .
.It Fl a
Match all installed packages.
-
.It Fl e
-
Match pkg-name as an exact string.
-
This is the default.
.It Fl g
Match pkg-name as a globbing expression
.It Fl o Op <oldorigin>:<neworigin>
@@ -70,6 +67,12 @@ Match pkg-name as a regular expression according to the "modern" or
.It Fl y
Assume yes rather than asking for confirmation before package autoremoval.
.El
+
.Pp
+
If neither the
+
.Fl g
+
nor
+
.Fl x
+
options are used, the default is to match pkg-name exactly.
.Sh FILES
See
.Xr pkg.conf 5 .
modified pkg/set.c
@@ -41,7 +41,7 @@
void
usage_set(void)
{
-
	fprintf(stderr, "usage: pkg set [-a] [-A [01]] [-o <oldorigin>:<neworigin>] [-y] [-egx] <pkg-name>\n\n");
+
	fprintf(stderr, "usage: pkg set [-a] [-A [01]] [-o <oldorigin>:<neworigin>] [-y] [-gx] <pkg-name>\n\n");
	fprintf(stderr, "For more information see 'pkg help set'. \n");
}

@@ -68,7 +68,7 @@ exec_set(int argc, char **argv)

	pkg_config_bool(PKG_CONFIG_ASSUME_ALWAYS_YES, &yes);

-
	while ((ch = getopt(argc, argv, "A:aego:xy")) != -1) {
+
	while ((ch = getopt(argc, argv, "A:ago:xy")) != -1) {
		switch (ch) {
		case 'A':
			sets |= AUTOMATIC;
@@ -81,9 +81,6 @@ exec_set(int argc, char **argv)
		case 'a':
			match = MATCH_ALL;
			break;
-
		case 'e':
-
			match = MATCH_EXACT;
-
			break;
		case 'g':
			match = MATCH_GLOB;
			break;