mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-23 16:42:19 +00:00
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.
37 lines
1.7 KiB
JavaScript
37 lines
1.7 KiB
JavaScript
// htop spec — the bundled Fig spec says the -H delay is in tenths of a second,
|
|
// but htop stores it in seconds (Settings.c clamps highlightDelaySecs and
|
|
// ProcessList.c compares 1000 * highlightDelaySecs). Only that wording differs.
|
|
const completionSpec = {
|
|
name: "htop",
|
|
description: "Improved top (interactive process viewer)",
|
|
options: [
|
|
{ name: ["--help", "-h"], description: "Show help for htop" },
|
|
{ name: ["--no-color", "-C"], description: "Use a monochrome color scheme" },
|
|
{
|
|
name: ["--delay", "-d"],
|
|
description: "Delay between updates, in tenths of sec",
|
|
args: { name: "delay", suggestions: ["10", "1", "60"] },
|
|
},
|
|
{ name: ["--filter", "-F"], description: "Filter commands", args: { name: "filter" } },
|
|
{
|
|
name: ["--highlight-changes", "-H"],
|
|
description: "Highlight new and old processes",
|
|
args: {
|
|
name: "delay",
|
|
description: "Highlight duration in seconds",
|
|
isOptional: true,
|
|
suggestions: ["1", "10", "60"],
|
|
},
|
|
},
|
|
{ name: ["--no-mouse", "-M"], description: "Disable the mouse" },
|
|
{ name: ["--pid", "-p"], description: "Show only the given PIDs", args: { name: "PID", isVariadic: true } },
|
|
{ name: ["--sort-key", "-s"], description: "Sort by the given column", args: { name: "column" } },
|
|
{ name: ["--tree", "-t"], description: "Show the tree view" },
|
|
{ name: ["--user", "-u"], description: "Show only processes of the given user", args: { name: "user", isOptional: true, suggestions: ["$USER"] } },
|
|
{ name: ["--no-unicode", "-U"], description: "Do not use unicode but plain ASCII" },
|
|
{ name: ["--version", "-V"], description: "Print version info" },
|
|
],
|
|
};
|
|
|
|
export default completionSpec;
|