From 6b328e64ba1faa7cf47c2d75bce73653a166890b Mon Sep 17 00:00:00 2001 From: ztimson Date: Fri, 29 Nov 2024 17:41:00 -0500 Subject: [PATCH] Added default help argument to arg-parser --- src/arg-parser.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/arg-parser.ts b/src/arg-parser.ts index 69c380c..e44cdce 100644 --- a/src/arg-parser.ts +++ b/src/arg-parser.ts @@ -14,6 +14,8 @@ export type Arg = { } export class ArgParser { + static readonly helpArg: Arg = {name: 'help', desc: 'Display command\'s help message', flags: ['-h', '--help'], default: false}; + commands: ArgParser[] = []; args: Arg[] = []; flags: Arg[] = [];