Skip to content

Commit

Permalink
teach pkg query about %Q
Browse files Browse the repository at this point in the history
  • Loading branch information
bapt committed Nov 11, 2017
1 parent ed56055 commit 1008819
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/pkg-query.8
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/query.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 1008819

Please sign in to comment.