Support reading package args from stdin
commit4fb3cfc48f626f84329c78351d6a8710255a35e3
authorDave Reisner <d@falconindy.com>
Thu, 4 Nov 2010 20:05:28 +0000 (4 16:05 -0400)
committerDan McGee <dan@archlinux.org>
Fri, 5 Nov 2010 02:10:32 +0000 (4 21:10 -0500)
tree565967136382130ddc850ceac030c7543c635909
parent0f3957ab48f34df8e151ec026dfac0d9d2df5aec
Support reading package args from stdin

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

This is better than using xargs, as xargs will not reconnect stdin to
the terminal. The above operation performed using xargs would require
the --noconfirm flag to be passed to pacman.

Signed-off-by: Dave Reisner <d@falconindy.com>
src/pacman/pacman.c