-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
The program below prints help text that gives the user alias help text in two locations:
import { initTRPC } from "@trpc/server";
import { createCli } from "trpc-cli";
import { z } from "zod";
const t = initTRPC.create();
const router = t.router({
add: t.procedure
.meta({})
.input(
z.object({
left: z.number().meta({ alias: "l", description: "Left number" }),
right: z.number().meta({ alias: "r", description: "Right number" }),
})
)
.query(({ input }) => input.left + input.right),
});
createCli({ router }).run();The help text:
Usage: index add [options]
Options:
-l, --left <number> Left number; Alias: l
-r, --right <number> Right number; Alias: r
-h, --help display help for command
Is there a way to hide/not print the Alias: l and Alias: r. They're redundant, given that -l, --left/-r, --right is printed at the start of the line.
Metadata
Metadata
Assignees
Labels
No labels