Skip to content

Commit

Permalink
Include completion commands in help output
Browse files Browse the repository at this point in the history
  • Loading branch information
rliebz committed Aug 18, 2020
1 parent cf55e70 commit e58ee31
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html

## Unreleased

## 0.6.1 (2020-08-17)
### Added
- Commands to install and uninstall completion will now appear in the help
documentation.


## 0.6.0 (2020-05-16)
### Added
Expand Down
10 changes: 4 additions & 6 deletions appcli/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,12 @@ func newBaseApp() *cli.App {
Usage: "Set `file` to use as the config file",
},
cli.StringFlag{
Name: "install-completion",
Usage: "Install tab completion for a `shell`",
Hidden: true,
Name: "install-completion",
Usage: "Install tab completion for a `shell`",
},
cli.StringFlag{
Name: "uninstall-completion",
Usage: "Uninstall tab completion for a `shell`",
Hidden: true,
Name: "uninstall-completion",
Usage: "Uninstall tab completion for a `shell`",
},
cli.BoolFlag{
Name: "q, quiet",
Expand Down
14 changes: 8 additions & 6 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,14 @@ Tasks:
tidy Clean up and format the repo
Global Options:
-f, --file <file> Set file to use as the config file
-h, --help Show help and exit
-q, --quiet Only print command output and application errors
-s, --silent Print no output
-V, --version Print version and exit
-v, --verbose Print verbose output
-f, --file <file> Set file to use as the config file
-h, --help Show help and exit
--install-completion <shell> Install tab completion for a shell
-q, --quiet Only print command output and application errors
-s, --silent Print no output
--uninstall-completion <shell> Uninstall tab completion for a shell
-V, --version Print version and exit
-v, --verbose Print verbose output
`

tpl := template.Must(template.New("help").Parse(message))
Expand Down

0 comments on commit e58ee31

Please sign in to comment.