Skip to content

Commit 4f971d1

Browse files
committed
Add basic pagination
- changed click.echo to click.echo_via_pager for a `less` style output - also changed SingleTable for DoubleTable as single table was displaying table borders as q's, n's and u's with the pager. This is similar to what was happening with Wil's and PuTTy and seesms to be known issue (Robpol86/terminaltables#57)
1 parent 912295e commit 4f971d1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

share/appliance_cli/src/text.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
import click
3-
from terminaltables import SingleTable
3+
from terminaltables import DoubleTable
44
import textwrap
55

66

@@ -42,9 +42,9 @@ def display_table(headers, data):
4242
bolded_headers = [bold(header) for header in headers]
4343
table_data = [bolded_headers] + data
4444

45-
table = SingleTable(table_data)
45+
table = DoubleTable(table_data)
4646
table.inner_row_border = True
47-
click.echo(table.table)
47+
click.echo_via_pager(table.table)
4848

4949

5050
def help_text_literal_paragraph(*parts):

0 commit comments

Comments
 (0)