summaryrefslogtreecommitdiffstats
path: root/pgcli/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'pgcli/main.py')
-rw-r--r--pgcli/main.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/pgcli/main.py b/pgcli/main.py
index 11dbc322..e1c6fc71 100644
--- a/pgcli/main.py
+++ b/pgcli/main.py
@@ -1083,9 +1083,10 @@ class PGCli:
def echo_via_pager(self, text, color=None):
if self.pgspecial.pager_config == PAGER_OFF or self.watch_command:
click.echo(text, color=color)
- elif "pspg" in os.environ.get("PAGER", "") and self.table_format == "csv":
- click.echo_via_pager(text, color)
- elif self.pgspecial.pager_config == PAGER_LONG_OUTPUT:
+ elif (
+ self.pgspecial.pager_config == PAGER_LONG_OUTPUT
+ and self.table_format != "csv"
+ ):
lines = text.split("\n")
# The last 4 lines are reserved for the pgcli menu and padding