Deprecating ps(1)s -w switch

Ivan Radovanovic rivanr at gmail.com
Tue Aug 25 19:08:27 UTC 2009


Doug Barton napisa:
> Brian Somers wrote:
>   
>> I recently closed bin/137647 and had second thoughts after Ivan (the
>> originator) challenged my reason for closing it.
>>
>> The suggestion is that ps's -w switch is a strange artifact that can
>> be safely deprecated.  ps goes to great lengths to implement width
>> limitations, and any time I've seen people not using -ww has either
>> been a mistake or doesn't matter.  Using 'cut -c1-N' is also a great
>> way of limiting widths if people really want that...
>>
>> I'd like to propose changing ps so that width limits are removed and
>> '-w' is deprecated - ignored for now with a note in the man page
>> saying that it will be removed in a future release.
>>
>> Does anyone have any objections to doing this?  I don't propose
>> merging this back into stable/8.
>>     
>
> Short version, yes, I object to changing the defaults.
>
> Longer version, I don't see anything wrong with the defaults the way
> that they are, and the fact that there is a teeny-tiny learning curve
> for people who need to see the full output isn't really an issue that
> deserves the time already spent on it. Bruce pointed out in the PR
> that most users would be surprised if 'ps -ax | grep foo' suddenly
> sprouted a lot more stuff that 'ps -ax' didn't have, and I agree. As a
> matter of personal preference I find the current defaults to be just
> lovely, and occasionally use -w or -ww if I need to see more. If you
> want the default to be something different, that's what aliases are for.
>
>
> Doug
>   
So, if the developer is presented with a task of developing utility to 
list running processes on the machine the right way to solve this 
problem is to implement it exactly the way the ps is implemented (ie, to 
please some aesthetic criteria (ie to format output to some width) 
rather than to focus on functionality)?
 
I think software should evolve to be better rather then to stick with 
something done the wrong way, even that has been done maybe 30 years ago 
- that is why behavior should be changed. It is never too late to do the 
right thing ;-)


Best regards,
Ivan


More information about the freebsd-hackers mailing list