Skip to content

FR: allow marking args/flags/options as global or exclusive to no subcommands #80

Open
@ZoomRmc

Description

@ZoomRmc

It would be very useful to be able to have two types of arguments/flags/options:

  1. Common to all invocations of the program, including all subcommands or no subcommands
  2. Conflicting with any subcommands

Syntax proposal:

var p = newParser:
  flag("-n", "--dryrun") # common
  rootCommand:
    arg("input") # can't be used with `frobnicate`
  command("frobnicate"):
    flag("-b")
    arg("subcommandInput")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions