Yeah, that won't really work since "dig david" might be perfectly valid and resolve. I could make you put a '.' on the end. I think what I'm going to do is wait for a space at the end since that will never show up for a hostname. Then I'll do an A lookup (common case) as well as provide filters for the other DNS types (mx, cname, txt, etc.). So then I can either run my app with a space at the end or if the last argument is one of the dns types.
Should work okay.
Then I suppose I should go update my earlier extensions Not financially rewarding, but it sure is fun