Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
teach pkg query about %Q
Baptiste Daroussin committed 8 years ago
commit 10088191f4e4b4d731041a5397d457f1acee7280
parent ed56055
2 files changed +6 -0
modified docs/pkg-query.8
@@ -128,6 +128,8 @@ as a dependency of another package, 0 otherwise.
The package can be automatically removed via
.Sq pkg autoremove
when this flag is set and no other package depends on it.
+
.It Cm \&%Q
+
Alternative architecture of the matches package
.It Cm \&%q
Architecture of the matched package
.It Cm \&%k
modified src/query.c
@@ -59,6 +59,7 @@ static struct query_flags accepted_query_flags[] = {
	{ '?', "drCFODLUGBbA",	1, PKG_LOAD_BASIC },	/* dbflags handled in analyse_query_string() */
	{ '#', "drCFODLUGBbA",	1, PKG_LOAD_BASIC },	/* dbflags handled in analyse_query_string() */
	{ 's', "hb",		0, PKG_LOAD_BASIC },
+
	{ 'Q', "",		0, PKG_LOAD_BASIC },
	{ 'n', "",		0, PKG_LOAD_BASIC },
	{ 'v', "",		0, PKG_LOAD_BASIC },
	{ 'o', "",		0, PKG_LOAD_BASIC },
@@ -217,6 +218,9 @@ format_str(struct pkg *pkg, UT_string *dest, const char *qstr, const void *data)
					break;
				}
				break;
+
			case 'Q':
+
				pkg_utstring_printf(dest, "%Q", pkg);
+
				break;
			case 'q':
				pkg_utstring_printf(dest, "%q", pkg);
				break;