Skip to content

Commit

Permalink
docs: fix typos using typos
Browse files Browse the repository at this point in the history
```sh
typos -w --exclude '**/*.go'
```
  • Loading branch information
suzuki-shunsuke committed Oct 27, 2024
1 parent 94107c2 commit 522951e
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ The V2 changes were all shipped in [urfave/cli/pull/892](https://github.com/urfa
### Added

- Added `NewStringSlice` and `NewIntSlice` for creating their related types
- Added `Float64SliceFlag` for unmarshaling a list of floats from the user
- Added `Float64SliceFlag` for unmarshalling a list of floats from the user
- Added `Context.Lineage` to get all contexts from current up to global
- Added `Context.LocalFlagNames` to get the flag names from *only* the current context
- Added `BoolFlag.Value` to handle both default-false and default-true
Expand Down
4 changes: 2 additions & 2 deletions docs/v1/examples/combining-short-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ or for individual commands by attaching it to the command configuration. For
example:

<!-- {
"args": ["short", "&#45;som", "Some message"],
"args": ["short", "&#45;some", "Some message"],
"output": "serve: true\noption: true\nmessage: Some message\n"
} -->
``` go
Expand Down Expand Up @@ -63,7 +63,7 @@ and `-m` respectively, setting `UseShortOptionHandling` will also support the
following syntax:

```
$ cmd -som "Some message"
$ cmd -some "Some message"
```

If you enable `UseShortOptionHandling`, then you must not use any flags that
Expand Down
10 changes: 5 additions & 5 deletions docs/v1/examples/generated-help-text.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ The default flag may be customized to something other than `-h/--help` by
setting `cli.HelpFlag`, e.g.:

<!-- {
"args": ["&#45;&#45halp"],
"output": "haaaaalp.*HALP"
"args": ["&#45;&#45help"],
"output": "haaaaalp.*HELP"
} -->
``` go
package main
Expand All @@ -93,9 +93,9 @@ import (

func main() {
cli.HelpFlag = cli.BoolFlag{
Name: "halp, haaaaalp",
Usage: "HALP",
EnvVar: "SHOW_HALP,HALPPLZ",
Name: "help, haaaaalp",
Usage: "HELP",
EnvVar: "SHOW_HELP,HALPPLZ",
}

err := cli.NewApp().Run(os.Args)
Expand Down
2 changes: 1 addition & 1 deletion docs/v1/examples/version-flag.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func init() {
cli.CommandHelpTemplate += "\nYMMV\n"
cli.SubcommandHelpTemplate += "\nor something\n"

cli.HelpFlag = cli.BoolFlag{Name: "halp"}
cli.HelpFlag = cli.BoolFlag{Name: "help"}
cli.BashCompletionFlag = cli.BoolFlag{Name: "compgen", Hidden: true}
cli.VersionFlag = cli.BoolFlag{Name: "print-version, V"}

Expand Down
4 changes: 2 additions & 2 deletions docs/v2/examples/combining-short-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ or for individual commands by attaching it to the command configuration. For
example:

<!-- {
"args": ["short", "&#45;som", "Some message"],
"args": ["short", "&#45;some", "Some message"],
"output": "serve: true\noption: true\nmessage: Some message\n"
} -->
```go
Expand Down Expand Up @@ -65,7 +65,7 @@ and `-m` respectively, setting `UseShortOptionHandling` will also support the
following syntax:

```sh-session
$ cmd -som "Some message"
$ cmd -some "Some message"
```

If you enable `UseShortOptionHandling`, then you must not use any flags that
Expand Down
2 changes: 1 addition & 1 deletion docs/v2/examples/full-api-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func init() {
cli.CommandHelpTemplate += "\nYMMV\n"
cli.SubcommandHelpTemplate += "\nor something\n"

cli.HelpFlag = &cli.BoolFlag{Name: "halp"}
cli.HelpFlag = &cli.BoolFlag{Name: "help"}
cli.VersionFlag = &cli.BoolFlag{Name: "print-version", Aliases: []string{"V"}}

cli.HelpPrinter = func(w io.Writer, templ string, data interface{}) {
Expand Down
10 changes: 5 additions & 5 deletions docs/v2/examples/generated-help-text.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ The default flag may be customized to something other than `-h/--help` by
setting `cli.HelpFlag`, e.g.:

<!-- {
"args": ["&#45;&#45halp"],
"output": "haaaaalp.*HALP"
"args": ["&#45;&#45help"],
"output": "haaaaalp.*HELP"
} -->
```go
package main
Expand All @@ -91,9 +91,9 @@ import (
func main() {
cli.HelpFlag = &cli.BoolFlag{
Name: "haaaaalp",
Aliases: []string{"halp"},
Usage: "HALP",
EnvVars: []string{"SHOW_HALP", "HALPPLZ"},
Aliases: []string{"help"},
Usage: "HELP",
EnvVars: []string{"SHOW_HELP", "HALPPLZ"},
}

(&cli.App{}).Run(os.Args)
Expand Down
4 changes: 2 additions & 2 deletions docs/v3/examples/combining-short-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ or for individual commands by attaching it to the command configuration. For
example:

<!-- {
"args": ["short", "&#45;som", "Some message"],
"args": ["short", "&#45;some", "Some message"],
"output": "serve: true\noption: true\nmessage: Some message\n"
} -->
```go
Expand Down Expand Up @@ -66,7 +66,7 @@ and `-m` respectively, setting `UseShortOptionHandling` will also support the
following syntax:

```sh-session
$ cmd -som "Some message"
$ cmd -some "Some message"
```

If you enable `UseShortOptionHandling`, then you must not use any flags that
Expand Down
2 changes: 1 addition & 1 deletion docs/v3/examples/full-api-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func init() {
cli.CommandHelpTemplate += "\nYMMV\n"
cli.SubcommandHelpTemplate += "\nor something\n"

cli.HelpFlag = &cli.BoolFlag{Name: "halp"}
cli.HelpFlag = &cli.BoolFlag{Name: "help"}
cli.VersionFlag = &cli.BoolFlag{Name: "print-version", Aliases: []string{"V"}}

cli.HelpPrinter = func(w io.Writer, templ string, data interface{}) {
Expand Down
10 changes: 5 additions & 5 deletions docs/v3/examples/generated-help-text.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ The default flag may be customized to something other than `-h/--help` by
setting `cli.HelpFlag`, e.g.:

<!-- {
"args": ["&#45;&#45halp"],
"output": "haaaaalp.*HALP"
"args": ["&#45;&#45help"],
"output": "haaaaalp.*HELP"
} -->
```go
package main
Expand All @@ -93,9 +93,9 @@ import (
func main() {
cli.HelpFlag = &cli.BoolFlag{
Name: "haaaaalp",
Aliases: []string{"halp"},
Usage: "HALP",
Sources: cli.EnvVars("SHOW_HALP", "HALPPLZ"),
Aliases: []string{"help"},
Usage: "HELP",
Sources: cli.EnvVars("SHOW_HELP", "HALPPLZ"),
}

(&cli.Command{}).Run(context.Background(), os.Args)
Expand Down

0 comments on commit 522951e

Please sign in to comment.