From ae5c0967cec40a7dcf9804ff592a4d15f1b26569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Mur=C3=A9?= Date: Tue, 28 Jul 2020 20:24:24 +0200 Subject: [PATCH] commands: cleanup the command's usage to avoid warnings when generating the doc --- commands/bridge_auth_addtoken.go | 2 +- commands/bridge_auth_rm.go | 2 +- commands/bridge_pull.go | 2 +- commands/bridge_push.go | 2 +- commands/bridge_rm.go | 2 +- commands/commands.go | 2 +- commands/comment.go | 4 ++-- commands/comment_add.go | 4 ++-- commands/label.go | 4 ++-- commands/label_add.go | 8 ++++--- commands/label_rm.go | 8 ++++--- commands/ls-id.go | 2 +- commands/ls.go | 2 +- commands/pull.go | 2 +- commands/push.go | 2 +- commands/rm.go | 2 +- commands/select.go | 6 +++--- commands/show.go | 12 +++++------ commands/status.go | 5 ++--- commands/status_close.go | 5 ++--- commands/status_open.go | 5 ++--- commands/title.go | 5 ++--- commands/title_edit.go | 4 ++-- commands/user.go | 12 +++++------ commands/user_adopt.go | 2 +- doc/man/git-bug-bridge-auth-add-token.1 | 2 +- doc/man/git-bug-bridge-auth-rm.1 | 2 +- doc/man/git-bug-bridge-pull.1 | 2 +- doc/man/git-bug-bridge-push.1 | 2 +- doc/man/git-bug-bridge-rm.1 | 2 +- doc/man/git-bug-commands.1 | 2 +- doc/man/git-bug-comment-add.1 | 2 +- doc/man/git-bug-comment.1 | 2 +- doc/man/git-bug-label-add.1 | 2 +- doc/man/git-bug-label-rm.1 | 2 +- doc/man/git-bug-label.1 | 2 +- doc/man/git-bug-ls-id.1 | 2 +- doc/man/git-bug-ls.1 | 2 +- doc/man/git-bug-pull.1 | 2 +- doc/man/git-bug-push.1 | 2 +- doc/man/git-bug-rm.1 | 28 +++++++++++++++++++++++++ doc/man/git-bug-select.1 | 4 ++-- doc/man/git-bug-show.1 | 2 +- doc/man/git-bug-status-close.1 | 2 +- doc/man/git-bug-status-open.1 | 2 +- doc/man/git-bug-status.1 | 2 +- doc/man/git-bug-title-edit.1 | 2 +- doc/man/git-bug-title.1 | 2 +- doc/man/git-bug-user-adopt.1 | 2 +- doc/man/git-bug-user.1 | 2 +- doc/man/git-bug.1 | 2 +- doc/md/git-bug.md | 1 + doc/md/git-bug_bridge_auth_add-token.md | 2 +- doc/md/git-bug_bridge_auth_rm.md | 2 +- doc/md/git-bug_bridge_pull.md | 2 +- doc/md/git-bug_bridge_push.md | 2 +- doc/md/git-bug_bridge_rm.md | 2 +- doc/md/git-bug_commands.md | 2 +- doc/md/git-bug_comment.md | 2 +- doc/md/git-bug_comment_add.md | 2 +- doc/md/git-bug_label.md | 2 +- doc/md/git-bug_label_add.md | 2 +- doc/md/git-bug_label_rm.md | 2 +- doc/md/git-bug_ls-id.md | 2 +- doc/md/git-bug_ls.md | 2 +- doc/md/git-bug_pull.md | 2 +- doc/md/git-bug_push.md | 2 +- doc/md/git-bug_rm.md | 22 +++++++++++++++++++ doc/md/git-bug_select.md | 4 ++-- doc/md/git-bug_show.md | 2 +- doc/md/git-bug_status.md | 2 +- doc/md/git-bug_status_close.md | 2 +- doc/md/git-bug_status_open.md | 2 +- doc/md/git-bug_title.md | 2 +- doc/md/git-bug_title_edit.md | 2 +- doc/md/git-bug_user.md | 2 +- doc/md/git-bug_user_adopt.md | 2 +- misc/bash_completion/git-bug | 21 +++++++++++++++++++ misc/gen_completion.go | 26 +++++++++++++---------- misc/powershell_completion/git-bug | 4 ++++ misc/zsh_completion/git-bug | 8 +++++++ 81 files changed, 203 insertions(+), 115 deletions(-) create mode 100644 doc/man/git-bug-rm.1 create mode 100644 doc/md/git-bug_rm.md diff --git a/commands/bridge_auth_addtoken.go b/commands/bridge_auth_addtoken.go index 55edd919b0243c3e86e41119335cbc98723b03b7..272eab8cf78b7f81735d7940ea93c0a04d207c5d 100644 --- a/commands/bridge_auth_addtoken.go +++ b/commands/bridge_auth_addtoken.go @@ -27,7 +27,7 @@ func newBridgeAuthAddTokenCommand() *cobra.Command { options := bridgeAuthAddTokenOptions{} cmd := &cobra.Command{ - Use: "add-token []", + Use: "add-token [TOKEN]", Short: "Store a new token", PreRunE: loadBackendEnsureUser(env), PostRunE: closeBackend(env), diff --git a/commands/bridge_auth_rm.go b/commands/bridge_auth_rm.go index b2a44e92d063a92a4da6b1e918cf0d6db7c733b3..fa73ad1152926b31927da4d241d607d8ab6db957 100644 --- a/commands/bridge_auth_rm.go +++ b/commands/bridge_auth_rm.go @@ -10,7 +10,7 @@ func newBridgeAuthRm() *cobra.Command { env := newEnv() cmd := &cobra.Command{ - Use: "rm ", + Use: "rm ID", Short: "Remove a credential.", PreRunE: loadRepo(env), RunE: func(cmd *cobra.Command, args []string) error { diff --git a/commands/bridge_pull.go b/commands/bridge_pull.go index bb7055824aae77af0d382fa2a7cf6b7ea646eb95..95eb2fe04b1373b1ce39179d3be90a32dcd32c2b 100644 --- a/commands/bridge_pull.go +++ b/commands/bridge_pull.go @@ -26,7 +26,7 @@ func newBridgePullCommand() *cobra.Command { options := bridgePullOptions{} cmd := &cobra.Command{ - Use: "pull []", + Use: "pull [NAME]", Short: "Pull updates.", PreRunE: loadBackend(env), PostRunE: closeBackend(env), diff --git a/commands/bridge_push.go b/commands/bridge_push.go index 7061a5ca2c91db389a99f526ffa90cb8e2fb03dd..64e3ff4bcfd8db7fe9c81ef42cff3206a598cb59 100644 --- a/commands/bridge_push.go +++ b/commands/bridge_push.go @@ -17,7 +17,7 @@ func newBridgePushCommand() *cobra.Command { env := newEnv() cmd := &cobra.Command{ - Use: "push []", + Use: "push [NAME]", Short: "Push updates.", PreRunE: loadBackendEnsureUser(env), PostRunE: closeBackend(env), diff --git a/commands/bridge_rm.go b/commands/bridge_rm.go index 9f93c37a0aece5cf20e8ab83c33b2c2dcbc111ab..9f5c81c7c48e31225ef833ff01c17fa85f4cd8b4 100644 --- a/commands/bridge_rm.go +++ b/commands/bridge_rm.go @@ -10,7 +10,7 @@ func newBridgeRm() *cobra.Command { env := newEnv() cmd := &cobra.Command{ - Use: "rm ", + Use: "rm NAME", Short: "Delete a configured bridge.", PreRunE: loadBackend(env), PostRunE: closeBackend(env), diff --git a/commands/commands.go b/commands/commands.go index 103d5412b8aa515ae098daa04f59f6637320c756..49c960abb4da73f4823aa246ad11cfd3d849a62d 100644 --- a/commands/commands.go +++ b/commands/commands.go @@ -15,7 +15,7 @@ func newCommandsCommand() *cobra.Command { options := commandOptions{} cmd := &cobra.Command{ - Use: "commands [