Skip to content

Commit 1eb69c1

Browse files
author
Juliya Smith
authored
Only use pager for large amounts when echoing dfs (#210)
1 parent 176388c commit 1eb69c1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/code42cli/output_formats.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,11 @@ def _format_output(self, output, *args, **kwargs):
112112
return self._format_func(output, *args, **self._output_args)
113113

114114
def echo_formatted_dataframe(self, output, *args, **kwargs):
115-
click.echo_via_pager(self._format_output(output, *args, **kwargs))
115+
str_output = self._format_output(output, *args, **kwargs)
116+
if len(output) <= 10:
117+
click.echo(str_output)
118+
else:
119+
click.echo_via_pager(str_output)
116120

117121

118122
def to_csv(output):

0 commit comments

Comments
 (0)