I'm trying to create options and commands in my script. When the user presses -h , I want Options to appear as well as commands to appear.
Please see the script below, am I going about this the wrong way. It appears cli.parse can only be used once.
// commandscommands=cli.parse(null,['showtest']);// optionsoptions=cli.parse({file: ['f','A file to process','file','temp.log'],// -f, --file FILE A file to processtime: ['t','An access time','time',false],// -t, --time TIME An access timework: [false,'What kind of work to do','string','sleep']// --work STRING What kind of work to do});
I'm trying to create options and commands in my script. When the user presses -h , I want Options to appear as well as commands to appear.
Please see the script below, am I going about this the wrong way. It appears
cli.parsecan only be used once.