Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jul 2011 21:21:13 +0400
From:      Test Rat <ttsestt@gmail.com>
To:        Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= <trasz@freebsd.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Autosizing column widths in ps(1).
Message-ID:  <86hb6e1bau.fsf@gmail.com>
In-Reply-To: <0CEA161B-6767-4379-B923-585B3D4EA74E@freebsd.org> ("Edward Tomasz =?utf-8?Q?Napiera=C5=82a=22's?= message of "Fri, 22 Jul 2011 17:51:28 %2B0200")
References:  <0CEA161B-6767-4379-B923-585B3D4EA74E@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Edward Tomasz Napiera=C5=82a <trasz@freebsd.org> writes:

> Patch below changes ps(1) to automatically size column widths according t=
o 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 vie=
w, it removes
> the need to specify widths.  Testing is welcome - the patch shouldn't cha=
nge ps(1)
> behaviour except slightly changing the widths, but the code changes are p=
retty 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=3D; read h; echo $h; sort -k3) | less



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86hb6e1bau.fsf>