Re: BUG #11986: psql uses pager inside Emacs shell buffer (not a terminal)
От | Alvaro Herrera |
---|---|
Тема | Re: BUG #11986: psql uses pager inside Emacs shell buffer (not a terminal) |
Дата | |
Msg-id | 20141210184548.GY1768@alvh.no-ip.org обсуждение исходный текст |
Ответ на | Re: BUG #11986: psql uses pager inside Emacs shell buffer (not a terminal) (Ed Avis <eda@waniasset.com>) |
Список | pgsql-bugs |
Ed Avis wrote: > psql decides whether to run a pager depending on whether its output is a tty. > That is the 'guessing' I referred to. > > If starting from scratch I would probably prefer pager=off to be the default, but that > is a larger change and would certainly inconvenience those who currently use psql in xterm, etc. This "guessing" is well established. Git uses a pager automatically when its output is a tty, for example, and doesn't use one when it's being piped or redirected. Telling git users that they must turn the pager off before redirecting would put off a lot of people, regardless of the "but you configured it so!" argument. I don't like software that does magic things when they don't make sense, but I do like software that does magic things when they are demonstrably useful -- particularly if I can turn them off in the very rare corner cases where I need to do that. I'm not an Emacs user, but years ago if I invoked "man" from inside Vim the pager was invoked and it had the stupid property of telling me that my terminal was dysfunctional (what!? it's a freaking xterm, FFS) and displaying useless, horrid prompts that I couldn't get rid of. I truly appreciate that now the pager, for some reason, now works correctly inside a Vim window. Not sure who fixed it but they have my sincerest appreciation. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-bugs по дате отправления: