search: add --fmt-stdin
When --fmt-stdin is set, JSON is taken directly from standard input,
instead of from aur-query. This allows in particular to pipe aur-pkglist
--info / --search output to aur-search.
For example, the following pipeline returns all orphan packages whose
name starts in 'r-':
$ aur pkglist --info | jq -r '{
"results": [.[] |
select(.Maintainer == null) |
select(.Name | test("^r-"))
], "type": "search", "version": 5
}' | aur search --fmt-stdin
This example originates from aurweb returning "Too many results" when
querying an empty maintainer (orphan) search. See:
https://gitlab.archlinux.org/archlinux/aurweb/-/issues/357