diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2017-06-07 11:16:31 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2017-06-07 11:37:23 +0200 |
commit | ea909e38dc48e85b5a0f8ab3536e9466a1bd98f6 (patch) | |
tree | ada5dbfd4a7b340c0797e20d0b3f68aab17847da | |
parent | a675a619f4d041383049fa24a946490f6166a4ae (diff) | |
download | NetworkManager-ea909e38dc48e85b5a0f8ab3536e9466a1bd98f6.tar.gz |
cli: disable pager in editor mode
nmcli closes its stdout when spawning the pager and thus, in editor
mode, nothing is printed once the pager terminates. For an interactive
mode like the editor, the pager seems not suitable, disable it.
Fixes: 24c079e4b2a06b4e5240a520650f6cfb183e2bf6
-rw-r--r-- | clients/cli/utils.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clients/cli/utils.c b/clients/cli/utils.c index 117a33d62e..b69f0ea75a 100644 --- a/clients/cli/utils.c +++ b/clients/cli/utils.c @@ -1484,7 +1484,8 @@ nmc_terminal_spawn_pager (const NmcConfig *nmc_config) pid_t parent_pid; int fd[2]; - if ( nm_cli.pager_pid > 0 + if ( nm_cli.nmc_config.in_editor + || nm_cli.pager_pid > 0 || nmc_config->print_output == NMC_PRINT_TERSE || !use_colors (nmc_config->use_colors) || g_strcmp0 (pager, "") == 0) |