Skip to content

Commit

Permalink
💬 Tweak flag descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Jul 13, 2022
1 parent 31d8700 commit c38692a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
10 changes: 5 additions & 5 deletions docs/yampl.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 [])
```

0 comments on commit c38692a

Please sign in to comment.