dev: display help message with green color (#4497)

This commit is contained in:
Oleksandr Redko 2024-03-13 16:05:35 +02:00 committed by GitHub
parent 0c4c36dbd8
commit 17329443f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -84,6 +84,7 @@ func (c *rootCommand) Execute() error {
}
func setupRootPersistentFlags(fs *pflag.FlagSet, opts *rootOptions) {
fs.BoolP("help", "h", false, color.GreenString("Help for a command"))
fs.BoolVarP(&opts.Verbose, "verbose", "v", false, color.GreenString("Verbose output"))
fs.StringVar(&opts.Color, "color", "auto", color.GreenString("Use color when printing; can be 'always', 'auto', or 'never'"))
}