Skip to content

Options & Commands #78

Description

@romans127

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});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions