Re: top: accept UIDs

2018-11-01 Thread Jason McIntyre
On Thu, Nov 01, 2018 at 10:27:18PM +0100, Klemens Nanni wrote: > On Thu, Nov 01, 2018 at 09:20:10PM +, Jason McIntyre wrote: > > while with the current behaviour it made sense to document it that way, > > once you change it, it just sounds odd. it should really be wrapped into > > the first

Re: top: accept UIDs

2018-11-01 Thread Ted Unangst
Klemens Nanni wrote: > On Thu, Nov 01, 2018 at 02:56:38PM -0400, Ted Unangst wrote: > > this looks to be in the wrong order. if 1000 is a username, that should be > > matched first before numeric lookup. > Preferring UIDs indeed clobbers usernames with the respective numerical > username. > >

Re: top: accept UIDs

2018-11-01 Thread Klemens Nanni
On Thu, Nov 01, 2018 at 09:20:10PM +, Jason McIntyre wrote: > while with the current behaviour it made sense to document it that way, > once you change it, it just sounds odd. it should really be wrapped into > the first sentence. sth like: > > Show only those processes owned by

Re: top: accept UIDs

2018-11-01 Thread Jason McIntyre
On Thu, Nov 01, 2018 at 09:04:03PM +0100, Klemens Nanni wrote: > On Thu, Nov 01, 2018 at 02:56:38PM -0400, Ted Unangst wrote: > > this looks to be in the wrong order. if 1000 is a username, that should be > > matched first before numeric lookup. > Preferring UIDs indeed clobbers usernames with the

Re: top: accept UIDs

2018-11-01 Thread Todd C. Miller
On Thu, 01 Nov 2018 21:04:03 +0100, Klemens Nanni wrote: > Here's a diff that tries UIDs only if username lookup fails. OK millert@ - todd

Re: top: accept UIDs

2018-11-01 Thread Klemens Nanni
On Thu, Nov 01, 2018 at 02:56:38PM -0400, Ted Unangst wrote: > this looks to be in the wrong order. if 1000 is a username, that should be > matched first before numeric lookup. Preferring UIDs indeed clobbers usernames with the respective numerical username. However, other parts in base such as

Re: top: accept UIDs

2018-11-01 Thread Ted Unangst
Klemens Nanni wrote: > This makes `top -U 0' and "u-1000" work. > > Overview: > > "kn" ok"10kn"ok if "10kn" exists else error > "-kn"ok"-10kn" ok if "10kn" exists else error > "1000" ok"--1000" error, negative UID and "-1000" not valid >

top: accept UIDs

2018-11-01 Thread Klemens Nanni
This makes `top -U 0' and "u-1000" work. Overview: "kn" ok"10kn"ok if "10kn" exists else error "-kn"ok"-10kn" ok if "10kn" exists else error "1000" ok"--1000" error, negative UID and "-1000" not valid "-1000" ok"--10kn" error,