[pacman-dev] [PATCH] Support reading package args from stdin

Allan McRae allan at archlinux.org
Sun Jul 25 00:07:57 EDT 2010


On 25/07/10 01:09, Dave Reisner wrote:
> On Sat, Jul 24, 2010 at 10:30:45AM -0400, Daenyth Blank wrote:
>> On Sat, Jul 24, 2010 at 10:21, Dan McGee<dpmcgee at gmail.com>  wrote:
>>> On Fri, Jul 23, 2010 at 10:26 PM, Dave Reisner<d at falconindy.com>  wrote:
>>>> Only occurs if no arguments were provided directly. Arguments can be
>>>> separated by any amount of valid whitespace. This allows for piping into
>>>> pacman from other programs or from itself, e.g.:
>>>>
>>>>   pacman -Qdtq | pacman -Rs
>>>
>>> What's wrong with xargs?
>> You can also just do pacman -Rs $(pacman -Qqdt)
>
> I hadn't considered xargs, but 'pacman -Xnn $()' always felt awkward to
> me compared to pipes. I suppose this doesn't provide any _extra_
> functionality, but it seemed like an easy enough addition for something
> that's a seemingly ubiquitous feature in *nix userspace. I understand if
> you consider this to be redundant.

I actually quite like this idea, despite there being multiple other ways 
to achieve the same thing.  The code is nicely self contained and is 
moderately useful so I do not see the downside.  I give it a +0.25.

Allan





More information about the pacman-dev mailing list