Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ $ go get gopkg.in/alecthomas/kingpin.v1

- *2014-06-27* -- Stable v1.1.0 release.
- Bug fixes.
- Always return an error (rather than panicing) when misconfigured.
- Always return an error (rather than panicking) when misconfigured.
- `OpenFile(flag, perm)` value type added, for finer control over opening files.
- Significantly improved usage formatting.

Expand Down
4 changes: 2 additions & 2 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type Application struct {
version string
errorWriter io.Writer // Destination for errors.
usageWriter io.Writer // Destination for usage
hiddenHelpWriter io.Writer // Desitination for hidden help commands.
hiddenHelpWriter io.Writer // Destination for hidden help commands.
usageTemplate string
usageFuncs map[string]interface{}
templateRenderer func(a *Application, context *ParseContext, indent int, tmpl string) error
Expand Down Expand Up @@ -703,7 +703,7 @@ func (a *Application) completionOptions(context *ParseContext) []string {

if strings.HasPrefix(prevArg, "--") && !strings.HasPrefix(currArg, "--") {
// Matches: ./myApp --flag value
// Wont Match: ./myApp --flag --
// Won't Match: ./myApp --flag --
flagName = prevArg[2:] // Strip the "--"
flagValue = currArg
} else if strings.HasPrefix(currArg, "--") {
Expand Down