Skip to content

Display global flags in subcommand #734

@xeals

Description

@xeals

Is it possible to display higher-level flags in a subcommand?

e.g., given:

app := &cli.App{
  Flags: []cli.Flag{
    cli.BoolFlag{
      Name: "verbose, v",
      Usage: "be LOUD",
    },
  },
  Commands: []cli.Command{
    cli.Command{
      Name: "status",
    },
  },
}

Is it possible for verbose to be displayed in status's help command without redefining the flag?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/v2relates to / is being considered for v2help wantedplease help if you can!kind/featuredescribes a code enhancement / feature requeststatus/confirmedconfirmed to be valid, but work has yet to start

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions