diff --git a/src/cmd/clone/root.go b/src/cmd/clone/root.go index 7af2331..803f6b3 100644 --- a/src/cmd/clone/root.go +++ b/src/cmd/clone/root.go @@ -14,7 +14,7 @@ import ( func init() { cmd.RootCmd.AddCommand(cloneCmd) } var cloneCmd = &cobra.Command{ - Use: "clone", + Use: "clone [repository_url]", Short: "Clone a repository", Args: cobra.MinimumNArgs(1), RunE: func(cobraCmd *cobra.Command, args []string) error { diff --git a/src/cmd/commit/root.go b/src/cmd/commit/root.go index a6093af..00acb63 100644 --- a/src/cmd/commit/root.go +++ b/src/cmd/commit/root.go @@ -13,7 +13,7 @@ import ( func init() { cmd.RootCmd.AddCommand(commitCmd) } var commitCmd = &cobra.Command{ - Use: "commit [files] [message] [description]", + Use: "commit [files] [message] [description:opt]/push:opt [push:opt] [remote_name:opt]", Short: "Add specified files and commit", Args: cobra.RangeArgs(0, 5), RunE: func(cobraCmd *cobra.Command, args []string) error { @@ -47,10 +47,10 @@ var commitCmd = &cobra.Command{ commitArgs := []string{"commit", "-m", args[1]} afterPush, remoteName := false, "origin" - // case 1 -> guh commit [files] [message] [desc] push[:optional] [remote_name:optional(origin)] - // case 2 -> guh commit [files] [message] [desc] push[:optional] - // case 3 -> guh commit [files] [message] push[:optional] [remote_name:optional(origin)] - // case 4 -> guh commit [files] [message] push[:optional] + // case 1 -> guh commit [files] [message] [desc] push[:opt] [remote_name:opt(origin)] + // case 2 -> guh commit [files] [message] [desc] push[:opt] + // case 3 -> guh commit [files] [message] push[:opt] [remote_name:opt(origin)] + // case 4 -> guh commit [files] [message] push[:opt] // case 5 -> guh commit [files] [message] [desc] // case 6 -> guh commit [files] [message] switch len(args) { diff --git a/src/cmd/diff/root.go b/src/cmd/diff/root.go index 6aa71b6..d7f8ca4 100644 --- a/src/cmd/diff/root.go +++ b/src/cmd/diff/root.go @@ -9,7 +9,7 @@ import ( func init() { cmd.RootCmd.AddCommand(diffCmd) } var diffCmd = &cobra.Command{ - Use: "diff [file:optional]", + Use: "diff [file:opt]", Short: "Show working tree changes", Args: cobra.MaximumNArgs(1), RunE: func(cobraCmd *cobra.Command, args []string) error { diff --git a/src/cmd/push/root.go b/src/cmd/push/root.go index 3442026..ea02b6a 100644 --- a/src/cmd/push/root.go +++ b/src/cmd/push/root.go @@ -11,7 +11,7 @@ import ( func init() { cmd.RootCmd.AddCommand(pushCmd) } var pushCmd = &cobra.Command{ - Use: "push [remote]", + Use: "push [remote:opt]", Short: "Add current changes and push", Args: cobra.MaximumNArgs(1), RunE: func(cobraCmd *cobra.Command, args []string) error {