Re: Fwd: Another little thing about psql wrapped expanded output

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: Josh Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fwd: Another little thing about psql wrapped expanded output
Date: 2015-12-03 15:41:51
Message-ID: CAMkU=1wcjZ3nUBjzf6964hcjv6WgKqnr7xwDL4EruSEotaUWsg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Dec 2, 2015 at 7:59 PM, David Fetter <david(at)fetter(dot)org> wrote:
> On Wed, Dec 02, 2015 at 10:36:56PM -0500, Josh Berkus wrote:
>> On 12/02/2015 05:24 PM, Tom Lane wrote:
>> > Don't think I agree. Suppose that you have a wider-than-screen table
>> > and you use a pager to scroll left and right in that. If we shorten the
>> > dashed lines, then once you scroll to the right of wherever they stop,
>> > you lose that visual cue separating the rows. This matters a lot if
>> > only a few of the column values are very wide: everywhere else, there's
>> > gonna be lots of whitespace.
>>
>> What pager lets me scroll right infinitely? Because I wanna install that.
>
> I don't know about infinitely, but at least with the -S (no wrap)
> option, less lets you use left- and right-arrow, prefixed by
> multipliers, if you like, to scroll horizontally
>
> And now I have learned something new about a pager I've used every day
> for decades.

And even if you don't specify -S, 'less' will jump into that mode
anyway as soon as you hit the right array. It starts out wrapping,
but hit the right arrow and it undoes the wrap. So I often do hit '1'
right arrow to get out of the wrap situation described above. I do
lose the leftmost character on the screen. Then you can left-arrow
all the way back to the left, and it jumps back into wrap mode.

Pretty darn useful at times. Now, if I could just find a way to tell
'less' after-the-fact "pretend I started you up with the -X flag".
Once I find the part I want, I want to quit the pager without clearing
that stuff off of the screen. Sometimes.

Cheers,

Jeff

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2015-12-03 15:42:30 Re: snapshot too old, configured by time
Previous Message Petr Jelinek 2015-12-03 15:06:56 Re: Logical replication and multimaster