Add actual querying capabilities to -query
The world is littered with broken grep commands because xrdb -query
can only dump the database and doesn't implement this simple search
feature.
Things I tested:
-
xrdb -query
without arguments works the same as before -
xrdb -query prop
prints the value ofprop
when it exists in the resource database. -
xrdb -query prop
doesn't print anything whenprop
doesn't exist in the resource database. -
xrdb -query prop
doesn't leak any memory. I run it in valgrind with the--leak-check=full
option.
PS: I think Sun took care of the fputs thing by now.