taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 6de60b6e7b4504db4941ef8ca7d6985d06997eaa
parent 3dd4af714a98bfe871813f082c465056f778ff71
Author: Florian Dold <dold@taler.net>
Date:   Thu,  6 Aug 2026 16:18:56 +0200

util: show argument help in clk

Help text given for a positional argument was accepted and then silently
dropped, so only the metavar ever reached the user.

Diffstat:
Mpackages/taler-util/src/clk.ts | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/packages/taler-util/src/clk.ts b/packages/taler-util/src/clk.ts @@ -315,6 +315,16 @@ export namespace clk { console.log(); console.log(this.scArgs.help); } + // Only when something has been documented: without help texts this + // would just repeat the usage line. + if (this.arguments.some((a) => a.args.help)) { + console.log(); + console.log("Arguments:"); + for (const arg of this.arguments) { + const argName = arg.args.metavar ?? arg.name; + console.log(formatListing(argName, arg.args.help)); + } + } if (this.options.length != 0) { console.log(); console.log("Options:");