Skip to content

Commit

Permalink
chore: Tidy update default values of --init flags
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Oct 29, 2022
1 parent 632c3af commit 1ccde54
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkg/cmd/applycmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (c *Config) newApplyCmd() *cobra.Command {
flags := applyCmd.Flags()
flags.VarP(c.apply.filter.Exclude, "exclude", "x", "Exclude entry types")
flags.VarP(c.apply.filter.Include, "include", "i", "Include entry types")
flags.BoolVar(&c.apply.init, "init", c.update.init, "Recreate config file from template")
flags.BoolVar(&c.apply.init, "init", c.apply.init, "Recreate config file from template")
flags.BoolVarP(&c.apply.recursive, "recursive", "r", c.apply.recursive, "Recurse into subdirectories")

registerExcludeIncludeFlagCompletionFuncs(applyCmd)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/archivecmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (c *Config) newArchiveCmd() *cobra.Command {
flags.VarP(&c.archive.format, "format", "f", "Set archive format")
flags.BoolVarP(&c.archive.gzip, "gzip", "z", c.archive.gzip, "Compress output with gzip")
flags.VarP(c.archive.filter.Exclude, "include", "i", "Include entry types")
flags.BoolVar(&c.archive.init, "init", c.update.init, "Recreate config file from template")
flags.BoolVar(&c.archive.init, "init", c.archive.init, "Recreate config file from template")
flags.BoolVarP(&c.archive.recursive, "recursive", "r", c.archive.recursive, "Recurse into subdirectories")

registerExcludeIncludeFlagCompletionFuncs(archiveCmd)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/diffcmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (c *Config) newDiffCmd() *cobra.Command {
flags := diffCmd.Flags()
flags.VarP(c.Diff.Exclude, "exclude", "x", "Exclude entry types")
flags.VarP(c.Diff.include, "include", "i", "Include entry types")
flags.BoolVar(&c.Diff.init, "init", c.update.init, "Recreate config file from template")
flags.BoolVar(&c.Diff.init, "init", c.Diff.init, "Recreate config file from template")
flags.BoolVarP(&c.Diff.recursive, "recursive", "r", c.Diff.recursive, "Recurse into subdirectories")
flags.BoolVar(&c.Diff.Reverse, "reverse", c.Diff.Reverse, "Reverse the direction of the diff")
flags.StringVar(&c.Diff.Pager, "pager", c.Diff.Pager, "Set pager")
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/dumpcmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (c *Config) newDumpCmd() *cobra.Command {
flags.VarP(c.dump.filter.Exclude, "exclude", "x", "Exclude entry types")
flags.VarP(&c.Format, "format", "f", "Output format")
flags.VarP(c.dump.filter.Include, "include", "i", "Include entry types")
flags.BoolVar(&c.dump.init, "init", c.update.init, "Recreate config file from template")
flags.BoolVar(&c.dump.init, "init", c.dump.init, "Recreate config file from template")
flags.BoolVarP(&c.dump.recursive, "recursive", "r", c.dump.recursive, "Recurse into subdirectories")
if err := dumpCmd.RegisterFlagCompletionFunc("format", writeDataFormatFlagCompletionFunc); err != nil {
panic(err)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/statuscmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (c *Config) newStatusCmd() *cobra.Command {
flags := statusCmd.Flags()
flags.VarP(c.Status.Exclude, "exclude", "x", "Exclude entry types")
flags.VarP(c.Status.include, "include", "i", "Include entry types")
flags.BoolVar(&c.Status.init, "init", c.update.init, "Recreate config file from template")
flags.BoolVar(&c.Status.init, "init", c.Status.init, "Recreate config file from template")
flags.BoolVarP(&c.Status.recursive, "recursive", "r", c.Status.recursive, "Recurse into subdirectories")

registerExcludeIncludeFlagCompletionFuncs(statusCmd)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/verifycmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (c *Config) newVerifyCmd() *cobra.Command {
flags := verifyCmd.Flags()
flags.VarP(c.Verify.Exclude, "exclude", "x", "Exclude entry types")
flags.VarP(c.Verify.include, "include", "i", "Include entry types")
flags.BoolVar(&c.Verify.init, "init", c.update.init, "Recreate config file from template")
flags.BoolVar(&c.Verify.init, "init", c.Verify.init, "Recreate config file from template")
flags.BoolVarP(&c.Verify.recursive, "recursive", "r", c.Verify.recursive, "Recurse into subdirectories")

registerExcludeIncludeFlagCompletionFuncs(verifyCmd)
Expand Down

0 comments on commit 1ccde54

Please sign in to comment.