Files
Netcatty/electron/specs/dig.js
T
csr588 192d5ca8a1 fix(autocomplete): correct GNU wording and add local specs
Follow-up review of batch 4 found wording that would show up in the popup and
two upstream spec defects. Local specs already override @withfig/autocomplete,
so the wrong option sets are replaced rather than translated around.

- Add electron/specs/{dig,readlink,base64,htop}.js:
  dig fixes the NS label and drops the bogus TTL type; readlink replaces the
  stat wording with the real GNU options; base64 moves from BSD -b/-i/-o to
  GNU -w and --ignore-garbage; htop documents the -H delay in seconds.
- Correct awk -c (traditional mode) and -t (--lint-old) to match gawk, with
  the dictionary keys migrated alongside -n.
- Reword review findings: htop -H highlights exited processes, split -a uses
  characters and -b uses KiB/MiB/GiB, dd cbs is a conversion record length,
  join -a/-v name the file index and -o covers unpaired lines, basename -a
  accepts multiple paths, env -0 ends records with NUL, dig ANY notes RFC 8482,
  su -f/-m keep the BSD behavior without hardcoded environment claims, and
  uname uses one verb for the kernel fields.
- Extend the zh-TW generator with documented post-conversion fixes (number
  bases, extended, instance, header, TLS extension, data) and regenerate.
- Update the batch 2 and batch 4 research notes, and resolve local specs first
  in the batch 4 test so it exercises what the app loads.
2026-11-08 12:51:14 +08:00

32 lines
1.5 KiB
JavaScript

// dig spec — corrects two upstream problems: the NS shortcut is labelled as an
// MX query, and "TTL" is offered as a record type even though TTL is a field.
const completionSpec = {
name: "dig",
description: "DNS lookup utility (Domain Information Groper)",
subcommands: [
{ name: "A", description: "Query A records (IPv4 address)" },
{ name: "AAAA", description: "Query AAAA records (IPv6 address)" },
{ name: "MX", description: "Query MX records (mail exchangers)" },
{ name: "CNAME", description: "Query CNAME records (canonical name)" },
{ name: "TXT", description: "Query TXT records" },
{ name: "NS", description: "Query NS records (authoritative name servers)" },
{ name: "SOA", description: "Query the SOA record (start of authority)" },
{
name: "ANY",
description: "Send an ANY query; the response may be incomplete (RFC 8482)",
},
],
options: [
{ name: "+short", description: "Only print meaningful results" },
{ name: "+noall", description: "Hide all sections except the ones requested explicitly" },
{ name: "+answer", description: "Show the answer section" },
{ name: "+nocomments", description: "Hide the comment lines" },
{ name: "+noquestion", description: "Hide the question section" },
{ name: "+noauthority", description: "Hide the authority section" },
{ name: "+noadditional", description: "Hide the additional section" },
{ name: "+nostats", description: "Hide the statistics block" },
],
};
export default completionSpec;