diff --git a/docs/v2/examples/flags.md b/docs/v2/examples/flags.md index f3792bff4b..d7c15f6934 100644 --- a/docs/v2/examples/flags.md +++ b/docs/v2/examples/flags.md @@ -104,9 +104,11 @@ See full list of flags at https://pkg.go.dev/github.com/urfave/cli/v2 For bool flags you can specify the flag multiple times to get a count(e.g -v -v -v or -vvv) +> If you want to support the `-vvv` flag, you need to set `App.UseShortOptionHandling`. + ```go package main @@ -123,10 +125,12 @@ func main() { var count int app := &cli.App{ + UseShortOptionHandling: true, Flags: []cli.Flag{ &cli.BoolFlag{ Name: "foo", Usage: "foo greeting", + Aliases: []string{"f"}, Count: &count, }, },