更新时间:2022-06-24 22:35:24
Psql 使用系统查看器在控制台中显示其输出。在 bash
中,它可能会将 less
用于其提供的可滚动/可页面化功能。要使用其他查看器或使用其他设置,您只需要设置 PAGER
环境变量。
Psql
uses a system viewer to show its output in the console. In bash
it likely uses less
for the scrollable/page-able features it provides. To use a different viewer or use different settings, you just need to set the PAGER
environment variable.
运行 psql
以将 less
与 -S
或-长切线
选项似乎对我有用:
Running psql
to use less
with the -S
or --chop-long-lines
option seemed to work for me:
PAGER="less -S" psql
您也可以在输入 -S
和 Enter的 less
中查看输出时启用此功能。 kbd>。
You can also enable this feature while viewing output in less
by typing -S
and Enter.