Skip to content

Commit

Permalink
unlisted CLI commands (keybase#21450)
Browse files Browse the repository at this point in the history
* govendor update github.com/keybase/cli/...

* filter out Unlisted flag

* govendor update github.com/keybase/cli/...
  • Loading branch information
mlsteele authored Dec 9, 2019
1 parent f91f01a commit fd94232
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 17 deletions.
8 changes: 4 additions & 4 deletions go/client/cmd_dump_keyfamily.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ func (v *CmdDumpKeyfamily) ParseArgv(ctx *cli.Context) error {
func NewCmdDumpKeyfamily(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Command {
return cli.Command{
Name: "dump-keyfamily",
Unlisted: true,
ArgumentHelp: "[username]",
// hide
// Usage: "Print out a user's current key family",
Description: "Print out a user's current key family. Don't specify a username to dump out your own keys.",
Flags: []cli.Flag{},
Usage: "Print out a user's current key family",
Description: "Print out a user's current key family. Don't specify a username to dump out your own keys.",
Flags: []cli.Flag{},
Action: func(c *cli.Context) {
cl.ChooseCommand(&CmdDumpKeyfamily{Contextified: libkb.NewContextified(g)}, "dump-keyfamily", c)
},
Expand Down
6 changes: 3 additions & 3 deletions go/client/cmd_wallet_setmobileonly.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ func newCmdWalletSetMobileOnly(cl *libcmdline.CommandLine, g *libkb.GlobalContex
Contextified: libkb.NewContextified(g),
}
return cli.Command{
Name: "set-mobile-only",
// Hide this command from `keybase wallet -h`, `keybase help wallet`:
// Usage: "Set an account to mobile-only mode",
Name: "set-mobile-only",
Unlisted: true, // Hide this command from `keybase wallet -h`, `keybase help wallet`
Usage: "Set an account to mobile-only mode",
Description: "Set an account to mobile-only mode",
Action: func(c *cli.Context) {
cl.ChooseCommand(cmd, "set-mobile-only", c)
Expand Down
6 changes: 3 additions & 3 deletions go/client/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ VERSION:
{{.Version}}
{{end}}{{if .Commands}}
COMMANDS:
{{range .Commands}}{{ if .Usage }} {{join .Names ", "}}{{ "\t" }}{{.Usage}}{{ "\n" }}{{ end }}{{end}}{{end}}{{if .HelpTopics}}
{{range .Commands}}{{ if not .Unlisted }}{{ if .Usage }} {{join .Names ", "}}{{ "\t" }}{{.Usage}}{{ "\n" }}{{ end }}{{end}}{{end}}{{end}}{{if .HelpTopics}}
ADDITIONAL HELP TOPICS:
{{range .HelpTopics}}{{.Name}}{{ "\t\t" }}{{.Usage}}
{{end}}{{end}}{{if .Copyright }}
Expand All @@ -208,7 +208,7 @@ DESCRIPTION:
{{.Description}}{{end}}{{ if .Subcommands }}
COMMANDS:
{{range .Subcommands}}{{if .Usage }} {{join .Names ", "}}{{ "\t" }}{{.Usage}}{{ "\n" }}{{ end }}{{end}}{{end}}{{if .Flags}}
{{range .Subcommands}}{{ if not .Unlisted }}{{if .Usage }} {{join .Names ", "}}{{ "\t" }}{{.Usage}}{{ "\n" }}{{ end }}{{end}}{{end}}{{end}}{{if .Flags}}
OPTIONS:
{{range .Flags}}{{.}}
Expand All @@ -228,5 +228,5 @@ USAGE:
{{.Name}} <command> [arguments...]
COMMANDS:
{{range .Commands}}{{ if .Usage }} {{join .Names ", "}}{{ "\t" }}{{.Usage}}{{ "\n" }}{{ end }}{{end}}
{{range .Commands}}{{ if not .Unlisted }}{{ if .Usage }} {{join .Names ", "}}{{ "\t" }}{{.Usage}}{{ "\n" }}{{ end }}{{end}}{{end}}
`
2 changes: 2 additions & 0 deletions go/vendor/github.com/keybase/cli/command.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions go/vendor/github.com/keybase/cli/help.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions go/vendor/vendor.json
Original file line number Diff line number Diff line change
Expand Up @@ -428,10 +428,10 @@
"revisionTime": "2016-05-17T06:10:00Z"
},
{
"checksumSHA1": "QPqgeDww5ENR6diSPCwNthJKXKw=",
"checksumSHA1": "f8ZUxvpenk9eQXrFMpg8L6x68SM=",
"path": "github.com/keybase/cli",
"revision": "5f59dc7950a7cc1ef374962cc6f6ff7527558806",
"revisionTime": "2018-11-19T22:17:51Z"
"revision": "5520171b294b988b8f73b43e3da3a3df3e322985",
"revisionTime": "2019-12-09T22:25:22Z"
},
{
"checksumSHA1": "qtfSDF71FbCm7kTNKdraxOpU7wY=",
Expand Down

0 comments on commit fd94232

Please sign in to comment.