3 ms·
Semi-related: Has anyone had issues with psql wrapping long lines incorrectly? Specifically it starts overwriting the current line. I'm using zsh on OS X using
by tcas 11y ago
Semi-related: Has anyone had issues with psql wrapping long lines incorrectly? Specifically it starts overwriting the current line. I'm using zsh on OS X using the default terminal, though the behavior also appears when SSHing to a remote server which uses bash.
I found this: http://stackoverflow.com/questions/2024884/commandline-overwrites-itself-when-the-commands-get-to-long http://stackoverflow.com/questions/2024884/commandline-overw... but it didn't seem to help.
- _yy 11y agoSame issue for me. Probably readline-related.
- pilif 11y agoThis only happens to me if I change the window size after launching psql. If I settle on a window size before launching it, then it never happens.
- colanderman 11y agoThis only happens to me if I change the window size while viewing query results in less(1) while inside of psql. Resizing the windows at the psql prompt itself always works for me (and in fact fixes any issues caused by resizing while inside of less(1)).
- olefoo 11y agoSet your pager to let the overflow go off the screen: export PAGER='less -S' And the lines will not wrap in the terminal, when you have a lot of output.
- fuhrysteve 11y agoThis here is some of the beauty of linux - psql simply pipes the output to less - a tool that is made exclusively to handle these sorts of "look at a bunch of text on a terminal" problems. Most of the problems less exists to solve would likely be deemed out of scope for a single-purpose utility like psql.
- caarlos0 11y agoI use `less -SX`
- narrator 11y ago$ shopt -s checkwinsize on the bash command line before starting psql should fix this. This was one of those things I figured out several years after I started using bash that would have made my life much less annoying.
- acqq 11y agoThanks! Having to discuss that in 2015 is sad: http://www.mail-archive.com/bug-bash@gnu.org/msg03562.html http://www.mail-archive.com/bug-bash@gnu.org/msg03562.html https://blogs.oracle.com/dp/entry/why_bash_doesn_t_work https://blogs.oracle.com/dp/entry/why_bash_doesn_t_work