Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Jul 2011 13:40:15 +0200
From:      =?iso-8859-2?Q?Edward_Tomasz_Napiera=B3a?= <trasz@freebsd.org>
To:        Test Rat <ttsestt@gmail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Autosizing column widths in ps(1).
Message-ID:  <589EB85A-1902-4643-A1FD-3C98445127DB@freebsd.org>
In-Reply-To: <86hb6e1bau.fsf@gmail.com>
References:  <0CEA161B-6767-4379-B923-585B3D4EA74E@freebsd.org> <86hb6e1bau.fsf@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Wiadomość napisana przez Test Rat w dniu 22 lip 2011, o godz. 19:21:
> Edward Tomasz Napierała <trasz@freebsd.org> writes:
> 
>> Patch below changes ps(1) to automatically size column widths according to their
>> contents.  From the user point of view, it prevents breaking layout with too wide values
>> and in most cases makes output narrower.  From the developer point of view, it removes
>> the need to specify widths.  Testing is welcome - the patch shouldn't change ps(1)
>> behaviour except slightly changing the widths, but the code changes are pretty large
>> and it's quite possible I've missed something.
> 
> STAT column seems to be right-aligned when it was previously left-aligned.
> This makes sorting it harder, e.g.
> 
>  $ ps ax | (IFS=; read h; echo $h; sort -k3) | less

Good catch, thanks!  Updated patch, which also fixes two issues affecting TTY column,
is at http://people.freebsd.org/~trasz/ps-9.diff.

--
If you cut off my head, what would I say?  Me and my head, or me and my body?




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?589EB85A-1902-4643-A1FD-3C98445127DB>