fa.openbsd.tech
[Top] [All Lists]

Re: [patch] ps.c ps.1 Disregard terminal width when STDOUT is not a tty

Subject: Re: [patch] ps.c ps.1 Disregard terminal width when STDOUT is not a tty (take 2)
From: "Nick Guenther" <kousue@xxxxxxxxx>
Date: Mon, 21 Jul 2008 17:18:47 UTC
Newsgroups: fa.openbsd.tech

On Mon, Jul 21, 2008 at 12:16 PM, Tobias Ulmer <tobiasu@xxxxxxxx> wrote:
> On Mon, Jul 21, 2008 at 05:17:31PM +0200, Paul de Weerd wrote:
>> On Mon, Jul 21, 2008 at 10:58:49AM -0400, Nick Guenther wrote:
>> | > No way to tell ps to create terminal width output for ps ... | grep
>> | > pipes any more.
>> |
>> | Huh? How do you use that? Isn't the point that grep searches records
>> | of related information? Why would you ever want it to be dealing with
>> | results split across lines?
>>
>> `ps | colorize` on your 80char wide terminal (with colorize being a
>> fictional tool that marks up stdin with color coding). Or how about
>> just simply `ps | sort` ? I can think of lots of programs I might want
>> to pipe ps output into that still displays on my terminal with (at
>> most) 80 char lines.
>>
>> This entire discussion also reminds me of the article I once read (but
>> now can't find anymore) that explained why ls(1) doing isatty was such
>> a bad idea (along with cat -n and others). Anyone know what article
>> I'm talking about ?
>
> Probably http://gaul.org/files/cat_-v_considered_harmful.html
>

""We are reminded that ls isn't the place for code to break a single
column into multiple ones"" except this seems to say that ls should
*always* behave in it's isatty(3) mode.

Anyway, I'll shut up now, I don't really care one way or the other. I
was just curious.
-Nick


<Prev in Thread] Current Thread [Next in Thread>