Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The command class should return literal arguments #26

Closed
c4spar opened this issue May 22, 2020 · 0 comments
Closed

The command class should return literal arguments #26

c4spar opened this issue May 22, 2020 · 0 comments
Labels
enhancement New feature or request module:command command module

Comments

@c4spar
Copy link
Owner

c4spar commented May 22, 2020

The command class and the command action handler should also return the literal arguments array which is return by the parseFlags() method.

deno run file.ts arg1 arg2 -- --flag1 val arg1

const { args, options, cmd, literal } = await new Command()
    // ...
    .parse( [ 'arg1', 'arg2', '--', '--flag1', 'val', 'arg1' ] ); 

console.log( literal ); // <-- [ '--flag1', 'val', 'arg1' ]

Provide also a way to access literal arguments inside a command action handler.

@c4spar c4spar added enhancement New feature or request module:command command module labels May 22, 2020
c4spar added a commit that referenced this issue Jun 4, 2020
@c4spar c4spar closed this as completed Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request module:command command module
Projects
None yet
Development

No branches or pull requests

1 participant