Skip to content

Co-existance of subcommands and positionals #8

@phoenixr-codes

Description

@phoenixr-codes

Currently, registering both subcommands and positionals to a command is not possible as the positional cannot accept the values representing a subcommand.

However in some scenarios it makes sense to support both. For example deno, bun and dart all support providing a path to a script to execute next to using the run subcommand. This also makes use of shebangs more convenient.

dart run script.dart
# same as
dart script.dart

To further restrict accidental clashes, a new argument like hybrid can be introduced.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions