[GH-ISSUE #6] Accept query type argument #5

Closed
opened 2026-03-14 01:01:56 +03:00 by kerem · 7 comments
Owner

Originally created by @hackel on GitHub (Sep 17, 2020).
Original GitHub issue: https://github.com/ameshkov/dnslookup/issues/6

It would be very useful to be able to supply the query type (A, AAAA, MX, etc.) when using this tool. I don't know go, but a quick look at the dns library makes it look pretty easy to add.

Originally created by @hackel on GitHub (Sep 17, 2020). Original GitHub issue: https://github.com/ameshkov/dnslookup/issues/6 It would be very useful to be able to supply the query type (A, AAAA, MX, etc.) when using this tool. I don't know go, but a quick look at the dns library makes it look pretty easy to add.
kerem 2026-03-14 01:01:56 +03:00
Author
Owner

@timkgh commented on GitHub (Dec 28, 2020):

+1

<!-- gh-comment-id:751557474 --> @timkgh commented on GitHub (Dec 28, 2020): +1
Author
Owner

@ameshkov commented on GitHub (Apr 22, 2021):

Possible with RRTYPE: RRTYPE=AAAA ./dnslookup example.org tls://dns.google

<!-- gh-comment-id:824836985 --> @ameshkov commented on GitHub (Apr 22, 2021): Possible with `RRTYPE`: `RRTYPE=AAAA ./dnslookup example.org tls://dns.google`
Author
Owner

@timkgh commented on GitHub (Apr 22, 2021):

Possible, but not ergonomic at all to use, not in the help.

How can a user discover it and remember how to use it?

<!-- gh-comment-id:824864188 --> @timkgh commented on GitHub (Apr 22, 2021): Possible, but not ergonomic at all to use, not in the help. How can a user discover it and remember how to use it?
Author
Owner

@huyz commented on GitHub (Apr 22, 2021):

I also find it a bit strange that options are passed by environment variable rather than as arguments to the command. Not typical for CLI commands

<!-- gh-comment-id:824869330 --> @huyz commented on GitHub (Apr 22, 2021): I also find it a bit strange that options are passed by environment variable rather than as arguments to the command. Not typical for CLI commands
Author
Owner

@ameshkov commented on GitHub (Apr 22, 2021):

Yeah, the CLI interface is rather ugly at the moment indeed.

I just don't have enough spare time to rework it.

Also, after reworking the CLI interface, I'll likely have to call it version 2.0 since it won't be compatible with v1.

<!-- gh-comment-id:824911334 --> @ameshkov commented on GitHub (Apr 22, 2021): Yeah, the CLI interface is rather ugly at the moment indeed. I just don't have enough spare time to rework it. Also, after reworking the CLI interface, I'll likely have to call it version 2.0 since it won't be compatible with v1.
Author
Owner

@ainar-g commented on GitHub (Sep 21, 2022):

@ameshkov, it's exceptionally unergonomic in PowerShell. Since there is currently no way to set an environment variable for one command only, one has to do something like this:

powershell -Command { $Env:RRTYPE='MX'; dnslookup 'my-mail.example' '94.140.15.15' }

I'd suggest at least reopening the issue.

<!-- gh-comment-id:1253818377 --> @ainar-g commented on GitHub (Sep 21, 2022): @ameshkov, it's exceptionally unergonomic in PowerShell. Since there is currently no way to set an environment variable for one command only, one has to do something like this: ```ps1 powershell -Command { $Env:RRTYPE='MX'; dnslookup 'my-mail.example' '94.140.15.15' } ``` I'd suggest at least reopening the issue.
Author
Owner

@ameshkov commented on GitHub (Sep 21, 2022):

I'd prefer to completely change the command-line interface in /v2, it's not just about query type

<!-- gh-comment-id:1253822269 --> @ameshkov commented on GitHub (Sep 21, 2022): I'd prefer to completely change the command-line interface in /v2, it's not just about query type
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/dnslookup#5
No description provided.