Skip to content

Commit

Permalink
Merge pull request #367 from Scalingo/fix/365/err-msg
Browse files Browse the repository at this point in the history
Correctly display help whe nthe users types an unknown command
  • Loading branch information
EtienneM committed Jul 4, 2018
2 parents 406aad2 + cd4ba80 commit 5d1a9e9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Changelog

* [logs] accepts filter for postdeploy and one-off container
* [authentication] use of the new authentication API `auth.scalingo.com`
* [help] fix missing help with unknown commsnds #365

### 1.7.0

Expand Down
5 changes: 2 additions & 3 deletions cmd/help.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package cmd

import (
"github.com/urfave/cli"
"github.com/Scalingo/cli/cmd/autocomplete"
"github.com/urfave/cli"
)

var (
Expand All @@ -13,9 +13,8 @@ var (
args := c.Args()
if args.Present() {
cli.ShowCommandHelp(c, args.First())
} else {
cli.ShowAppHelp(c)
}
cli.ShowAppHelp(c)
},
BashComplete: func(c *cli.Context) {
autocomplete.CmdFlagsAutoComplete(c, "help")
Expand Down
3 changes: 2 additions & 1 deletion scalingo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ COMMANDS:{{range .VisibleCategories}}{{if .Name}}
{{end}}{{end}}{{if .VisibleFlags}}
GLOBAL OPTIONS:
{{range $index, $option := .VisibleFlags}}{{if $index}}
{{end}}{{$option}}{{end}}{{end}}{{if .Copyright}}
{{end}}{{$option}}{{end}}{{end}}
{{if .Copyright}}
COPYRIGHT:
{{.Copyright}}{{end}}
Expand Down

0 comments on commit 5d1a9e9

Please sign in to comment.