Skip to content

Commit

Permalink
feat(whois): add options (withfig#594)
Browse files Browse the repository at this point in the history
* Add BSD whois options

* Add exclusivity to -h|-c
  • Loading branch information
clo4 authored Sep 27, 2021
1 parent 4378ab1 commit 45bab21
Showing 1 changed file with 88 additions and 4 deletions.
92 changes: 88 additions & 4 deletions src/whois.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,97 @@
const completionSpec: Fig.Spec = {
name: "whois",
description: "Query a database for information about a domain registrant",
args: {
name: "name",
isVariadic: true,
},
description: "Client for the whois directory service",
options: [
{ name: ["-H", "-p", "PORT"], description: "Connect to PORT" },
{ name: "--verbose", description: "Be verbose" },
{ name: "--help", description: "Display online help" },
{
name: "-a",
description:
"Use the American Registry for Internet Numbers (ARIN) database",
},
{
name: "-A",
description:
"Use the Asia/Pacific Network Information Center (APNIC) database",
},
{
name: "-b",
description: "Use the Network Abuse Clearinghouse database",
},
{
name: "-c",
description:
"Equivalent to '-h TLD.whois-servers.net', where 'TLD' is this option's argument",
args: { name: "TLD" },
exclusiveOn: ["-h"],
},
{
name: "-f",
description:
"Use the African Network Information Centre (AfriNIC) database",
},
{
name: "-g",
description: "Use the US non-military federal government database",
},
{
name: "-h",
description:
"Use the specified host instead of the default (host name or IP)",
args: { name: "hostname" },
exclusiveOn: ["-c"],
},
{
name: "-i",
description:
"Use the traditional Network Information Center (InterNIC) database",
},
{
name: "-I",
description:
"Use the Internet Assigned Numbers Authority (IANA) database",
},
{
name: "-k",
description:
"Use the National Internet Development Agency of Korea (KRNIC) database",
},
{
name: "-l",
description:
"Use the Latin American and Caribbean IP address Regional Registry (LACNIC) database",
},
{
name: "-m",
description: "Use the Route Arbiter Database (RADB) database",
},
{
name: "-p",
description: "Connect to the whois server on the given port",
args: { name: "port", default: "43" },
},
{
name: "-P",
description: "Use the PeeringDB database of AS numbers",
},
{
name: "-Q",
description: "Do a quick lookup (don't follow referrals)",
},
{
name: "-r",
description: "Use the Réseaux IP Européens (RIPE) database",
},
{
name: "-R",
description: "Do a recursive lookup",
},
{
name: "-S",
description: "Print the output verbatim",
},
],
};

Expand Down

0 comments on commit 45bab21

Please sign in to comment.