From 49b471e188ddf41442aa700bd3665364d1043c15 Mon Sep 17 00:00:00 2001 From: Slug-Boi Date: Tue, 12 Nov 2024 21:59:10 +0100 Subject: [PATCH] docs: update usage messages of all cobra commands --- src/cmd/cz.go | 5 +++-- src/cmd/root.go | 13 +++++++------ src/cmd/users.go | 4 ++-- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/cmd/cz.go b/src/cmd/cz.go index eec3b09..a2e52e2 100644 --- a/src/cmd/cz.go +++ b/src/cmd/cz.go @@ -14,8 +14,9 @@ var czCmd = &cobra.Command{ Use: "cz", Short: "Allows for commitizen commit messages", Long: `This command will allow the user to use commitizen to craft the commit message - after which the user will be able to add co-authors to the commit message. This will require - the user to have commitizen installed on their system.`, +after which the user will be able to add co-authors to the commit message. This command defaults +to the TUI author selection but flags can be used to make it use the cli syntax. +This will require the user to have commitizen installed on their system.`, Run: func(cmd *cobra.Command, args []string) { var message string var authors []string diff --git a/src/cmd/root.go b/src/cmd/root.go index 946b8d3..4f8b4ce 100644 --- a/src/cmd/root.go +++ b/src/cmd/root.go @@ -14,12 +14,13 @@ import ( // rootCmd represents the base command when called without any subcommands // func RootCmd() *cobra.Command { var rootCmd = &cobra.Command{ - Use: `cocommit [co-author2] ... || - cocommit [co-author2:email] ... || - cocommit all || - cocommit ^ ^[co-author2] ... || - cocommit || - cocommit users ||`, + Use: `cocommit *Opens the TUI* + cocommit [co-author2] ... + cocommit [co-author2:email] ... + cocommit all + cocommit ^ ^[co-author2] ... + cocommit + cocommit users `, DisableFlagsInUseLine: true, Short: "A cli tool to help you add co-authors to your git commits", Long: `A cli tool to help you add co-authors to your git commits`, diff --git a/src/cmd/users.go b/src/cmd/users.go index 14160c7..fda9fd7 100644 --- a/src/cmd/users.go +++ b/src/cmd/users.go @@ -19,8 +19,8 @@ var authorfile = utils.Find_authorfile() func UsersCmd() *cobra.Command { return &cobra.Command{ Use: "users", - Short: "Displays all users from the author file located at: " + authorfile, - Long: `Displays all users from the author file located at: ` + authorfile, + Short: "Displays all users from the author file located at:\n" + authorfile, + Long: `Displays all users from the author file located at:` + "\n" + authorfile, Run: func(cmd *cobra.Command, args []string) { //TODO: make this print a bit prettier (sort it and maybe use a table) // check if the no pretty print flag is set