Re: Proposed patch - psql wraps at window width

From: Bryce Nesbitt <bryce2(at)obviously(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Gregory Stark <stark(at)enterprisedb(dot)com>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Brendan Jurd <direvus(at)gmail(dot)com>, heikki(at)enterprisedb(dot)com
Subject: Re: Proposed patch - psql wraps at window width
Date: 2008-04-28 01:38:05
Message-ID: 48152A7D.70104@obviously.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
>
>> I don't see that behavior here on Ubuntu 7.10:
>> $ COLUMNNS=120 ls -C |cat
>> archive cd initrd lost+found proc srv usr
>> basement.usr dev initrd.img media root sys var
>> bin etc laptop mnt rtmp tmp vmlinuz
>> boot home lib opt sbin u win
>> $ ls --version
>> ls (GNU coreutils) 5.97
>>
> Well, it's *certainly* gonna ignore "COLUMNNS".
>
> regards, tom lane
>
I'm having trouble seeing the relevance, either way. First many shells
don't set $COLUMNS at all (readline does it for psql). And most shells
that set $COLUMNS don't export it. So most people get different output
from:

# ls -C
# ls -C | cat

Unless they are in the habit of doing:

# COLUMNS=$COLUMNS ls -C |cat

I think it's too weird to default pipes to whatever the terminal width
happens to be. So that leaves you with an explicit command to set the
width for pipes.

-Bryce

Echo $MANWIDTH

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff MacDonald 2008-04-28 04:34:32 quirk using 'ltree' module: paths ending with a dot result in cryptic error message
Previous Message Brendan Jurd 2008-04-27 20:20:47 Re: Invalid to_date patterns (was: [PATCHES] [GENERAL] ISO week dates)