cli: spawn pager on "nmcli c" and "nmcli g permsisions"

There's a couple of places where compose the output using nmc_print().
However, most of them (such as connectivity status or logging level) are
mostly one-line outputs where pager wouldn't make sense. These two stand
out.
This commit is contained in:
Lubomir Rintel 2018-06-11 10:16:37 +02:00
parent 152560e294
commit e7d70561aa
2 changed files with 6 additions and 0 deletions

View file

@ -1940,6 +1940,9 @@ do_connections_show (NmCli *nmc, int argc, char **argv)
}
}
/* Optionally start paging the output. */
nmc_terminal_spawn_pager (&nmc->nmc_config);
items = con_show_get_items (nmc, active_only, show_active_fields, order);
g_ptr_array_add (items, NULL);
if (!nmc_print (&nmc->nmc_config,

View file

@ -560,6 +560,9 @@ print_permissions (void *user_data)
permissions[i++] = GINT_TO_POINTER (perm);
permissions[i++] = NULL;
/* Optionally start paging the output. */
nmc_terminal_spawn_pager (&nmc->nmc_config);
if (!nmc_print (&nmc->nmc_config,
permissions,
_("NetworkManager permissions"),