For the current running cli process, it can be useful to be able to
disable the pager in case of long running command (e.g. ping).
For a small window, the pager will prompt and hide the results of the
command.
Type: improvement
Change-Id: I8fdde7f581683a8d9fd702a744fb95b5c58e14ff
Signed-off-by: Maxime Peim <[email protected]>
return cf;
}
+u8
+vlib_unix_cli_enable_disable_pager (u8 enable)
+{
+ unix_cli_main_t *cm = &unix_cli_main;
+ unix_cli_file_t *cf = unix_cli_file_if_interactive (cm);
+ u8 old;
+
+ if (!cf)
+ return ~0;
+
+ old = !cf->no_pager;
+ cf->no_pager = !enable;
+ return old;
+}
+
/** CLI command to quit the terminal session.
* @note If this is a stdin session then this will
* shutdown VPP also.
/* Set prompt for CLI. */
void vlib_unix_cli_set_prompt (char *prompt);
+u8 vlib_unix_cli_enable_disable_pager (u8 enable);
+
static inline unix_main_t *
vlib_unix_get_main (void)
{