From c38692ad6aecec6dd83f6bc49748eae7f0db8c34 Mon Sep 17 00:00:00 2001 From: Gabe Cook Date: Tue, 12 Jul 2022 21:24:17 -0500 Subject: [PATCH] :speech_balloon: Tweak flag descriptions --- cmd/cmd.go | 10 +++++----- docs/yampl.md | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cmd/cmd.go b/cmd/cmd.go index ccb0b45..6054043 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -34,13 +34,13 @@ var Command = &cobra.Command{ var conf = config.New() func init() { - Command.Flags().BoolVarP(&conf.Inplace, "inplace", "i", conf.Inplace, "Update files inplace") + Command.Flags().BoolVarP(&conf.Inplace, "inplace", "i", conf.Inplace, "Edit files in place") Command.Flags().StringVarP(&conf.Prefix, "prefix", "p", conf.Prefix, "Template comments must begin with this prefix. The beginning '#' is implied.") - Command.Flags().StringVar(&conf.LeftDelim, "left-delim", conf.LeftDelim, "Override the left delimiter") - Command.Flags().StringVar(&conf.RightDelim, "right-delim", conf.RightDelim, "Override the right delimiter") + Command.Flags().StringVar(&conf.LeftDelim, "left-delim", conf.LeftDelim, "Override template left delimiter") + Command.Flags().StringVar(&conf.RightDelim, "right-delim", conf.RightDelim, "Override template right delimiter") Command.Flags().IntVarP(&conf.Indent, "indent", "I", conf.Indent, "Override output indentation") - Command.Flags().BoolVarP(&conf.Fail, "fail", "f", conf.Fail, `Trigger an error if a template variable is missing`) - Command.Flags().BoolVarP(&conf.Strip, "strip", "s", conf.Strip, "Strip comments in generated template") + Command.Flags().BoolVarP(&conf.Fail, "fail", "f", conf.Fail, `Exit with an error if a template variable is not set`) + Command.Flags().BoolVarP(&conf.Strip, "strip", "s", conf.Strip, "Strip template comments from output") } func validArgs(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) { diff --git a/docs/yampl.md b/docs/yampl.md index b74e234..d335fc0 100644 --- a/docs/yampl.md +++ b/docs/yampl.md @@ -38,16 +38,16 @@ yampl [-i] [-p prefix] [-v key=value ...] [file ...] ``` --completion string Output command-line completion code for the specified shell. Can be 'bash', 'zsh', 'fish', or 'powershell'. - -f, --fail Trigger an error if a template variable is missing + -f, --fail Exit with an error if a template variable is not set -h, --help help for yampl -I, --indent int Override output indentation (default 2) - -i, --inplace Update files inplace - --left-delim string Override the left delimiter (default "{{") + -i, --inplace Edit files in place + --left-delim string Override template left delimiter (default "{{") --log-format string Log format (auto, color, plain, json) (default "color") -l, --log-level string Log level (trace, debug, info, warning, error, fatal, panic) (default "info") -p, --prefix string Template comments must begin with this prefix. The beginning '#' is implied. (default "#yampl") - --right-delim string Override the right delimiter (default "}}") - -s, --strip Strip comments in generated template + --right-delim string Override template right delimiter (default "}}") + -s, --strip Strip template comments from output -v, --value stringToString Define a template variable. Can be used more than once. (default []) ```