From 0011865e24c87a0e33630af9800c62ef43a0dc18 Mon Sep 17 00:00:00 2001
From: Tamer Tas <contact@tmrts.com>
Date: Mon, 14 Dec 2015 16:42:45 +0200
Subject: [PATCH] Improve cmd-line command short descriptions

---
 pkg/cmd/delete.go   | 2 +-
 pkg/cmd/download.go | 2 +-
 pkg/cmd/init.go     | 2 +-
 pkg/cmd/list.go     | 2 +-
 pkg/cmd/save.go     | 2 +-
 pkg/cmd/use.go      | 2 +-
 pkg/cmd/version.go  | 5 ++++-
 7 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/pkg/cmd/delete.go b/pkg/cmd/delete.go
index 8c15005..47fdce7 100644
--- a/pkg/cmd/delete.go
+++ b/pkg/cmd/delete.go
@@ -15,7 +15,7 @@ import (
 
 var Delete = &cli.Command{
 	Use:   "delete <template-name>",
-	Short: "Deletes a project template from the template registry",
+	Short: "Delete a project template from the template registry",
 	Run: func(c *cli.Command, args []string) {
 		MustValidateArgs(args, []validate.Argument{
 			{"template-path", validate.Alphanumeric},
diff --git a/pkg/cmd/download.go b/pkg/cmd/download.go
index 63113ec..97e23c4 100644
--- a/pkg/cmd/download.go
+++ b/pkg/cmd/download.go
@@ -94,7 +94,7 @@ func downloadZip(URL, targetDir string) error {
 // FIXME Half-Updates leave messy templates
 var Download = &cli.Command{
 	Use:   "download <template-repo> <template-name>",
-	Short: "Downloads a project template from an URL to template registry",
+	Short: "Download a project template from a github repository to template registry",
 	Run: func(c *cli.Command, args []string) {
 		MustValidateArgs(args, []validate.Argument{
 			{"template-repo", validate.UnixPath},
diff --git a/pkg/cmd/init.go b/pkg/cmd/init.go
index 133c8f5..9904dc9 100644
--- a/pkg/cmd/init.go
+++ b/pkg/cmd/init.go
@@ -17,7 +17,7 @@ var (
 // TODO remove?
 var Init = &cli.Command{
 	Use:   "init",
-	Short: "Initializes directories required by tmplt",
+	Short: "Initialize directories required by tmplt (By default done by installation script)",
 	Run: func(c *cli.Command, _ []string) {
 		// Check if .config/tmplt exists
 		if exists, err := osutil.DirExists(tmplt.Configuration.TemplateDirPath); exists {
diff --git a/pkg/cmd/list.go b/pkg/cmd/list.go
index c0c0bcb..d516d14 100644
--- a/pkg/cmd/list.go
+++ b/pkg/cmd/list.go
@@ -34,7 +34,7 @@ func ListTemplates() (map[string]bool, error) {
 
 var List = &cli.Command{
 	Use:   "list <template-path> <template-name>",
-	Short: "Lists templates found in the template registry",
+	Short: "List project templates found in the local template registry",
 	Run: func(c *cli.Command, args []string) {
 		MustValidateArgs(args, []validate.Argument{})
 
diff --git a/pkg/cmd/save.go b/pkg/cmd/save.go
index a41b9c4..32a90ef 100644
--- a/pkg/cmd/save.go
+++ b/pkg/cmd/save.go
@@ -15,7 +15,7 @@ import (
 
 var Save = &cli.Command{
 	Use:   "save <template-path> <template-name>",
-	Short: "Saves a project template to template registry",
+	Short: "Save a project template to local template registry",
 	Run: func(c *cli.Command, args []string) {
 		MustValidateArgs(args, []validate.Argument{
 			{"template-path", validate.UnixPath},
diff --git a/pkg/cmd/use.go b/pkg/cmd/use.go
index 6445db8..049e32c 100644
--- a/pkg/cmd/use.go
+++ b/pkg/cmd/use.go
@@ -26,7 +26,7 @@ func TemplateInRegistry(name string) (bool, error) {
 // TODO add --use-cache flag to execute a template from previous answers to prompts
 var Use = &cli.Command{
 	Use:   "use <template-name> <target-dir>",
-	Short: "Executes a project template",
+	Short: "Execute a project template in the given directory",
 	Run: func(_ *cli.Command, args []string) {
 		MustValidateArgs(args, []validate.Argument{
 			{"template-name", validate.UnixPath},
diff --git a/pkg/cmd/version.go b/pkg/cmd/version.go
index ed5e992..4e0e9e5 100644
--- a/pkg/cmd/version.go
+++ b/pkg/cmd/version.go
@@ -6,12 +6,15 @@ import (
 	cli "github.com/spf13/cobra"
 
 	"github.com/tmrts/tmplt/pkg/tmplt"
+	"github.com/tmrts/tmplt/pkg/util/validate"
 )
 
 var Version = &cli.Command{
 	Use:   "version",
-	Short: "Version information for tmplt",
+	Short: "Show the tmplt version information",
 	Run: func(_ *cli.Command, args []string) {
+		MustValidateArgs(args, []validate.Argument{})
+
 		fmt.Println("Current version is", tmplt.Version)
 	},
 }
-- 
GitLab