diff options
author | Guillem Jover <guillem@debian.org> | 2018-10-01 02:58:30 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2018-10-08 12:11:52 +0200 |
commit | a07a608516f2eb7abcf2fdb3922503ea20b3a508 (patch) | |
tree | fbb8b989a4ae8f1e8e90261a57ceba8585927e3b /src/querycmd.c | |
parent | 68b0f4dd8ac3f541926796a303015df782ef76ed (diff) | |
download | dpkg-a07a608516f2eb7abcf2fdb3922503ea20b3a508.tar.gz |
dpkg, dpkg-query: Add new --no-pager option
This makes it possible to disable any pager usage from these programs.
For dpkg this also becomes a configuration option.
Closes: #909754
Diffstat (limited to 'src/querycmd.c')
-rw-r--r-- | src/querycmd.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/querycmd.c b/src/querycmd.c index a62b27655..173c4ad91 100644 --- a/src/querycmd.c +++ b/src/querycmd.c @@ -747,6 +747,12 @@ control_show(const char *const *argv) return 0; } +static void +set_no_pager(const struct cmdinfo *ci, const char *value) +{ + pager_enable(false); +} + static void DPKG_ATTR_NORET printversion(const struct cmdinfo *ci, const char *value) { @@ -831,6 +837,7 @@ static const struct cmdinfo cmdinfos[]= { { "admindir", 0, 1, NULL, &admindir, NULL }, { "load-avail", 0, 0, &opt_loadavail, NULL, NULL, 1 }, { "showformat", 'f', 1, NULL, &showformat, NULL }, + { "no-pager", 0, 0, NULL, NULL, set_no_pager }, { "help", '?', 0, NULL, NULL, usage }, { "version", 0, 0, NULL, NULL, printversion }, { NULL, 0, 0, NULL, NULL, NULL } |