-
-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add disables colorized output option #718
Conversation
cli.go
Outdated
@@ -16,6 +16,7 @@ type CLIOptions struct { | |||
AssumeRoleARN string `help:"the ARN of the role to assume" default:"" env:"ECSPRESSO_ASSUME_ROLE_ARN"` | |||
Timeout *time.Duration `help:"timeout. Override in a configuration file." env:"ECSPRESSO_TIMEOUT"` | |||
FilterCommand string `help:"filter command" env:"ECSPRESSO_FILTER_COMMAND"` | |||
NoColor bool `help:"disables colorized output" default:"false"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the negative flag that has a default false value is confusing a little.
alecthomas/kong has the negatable
attribute to make --no-xxx
flag from the positive flag --xxx
automatically.
NoColor bool `help:"disables colorized output" default:"false"` | |
Color bool `help:"enable colorized output" env:"ECSPRESSO_COLOR" default:"true" negatable:""` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in aee93f2 .
Thanks for the suggestion!
cliv2.go
Outdated
if opts.NoColor { | ||
color.NoColor = true | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if opts.NoColor { | |
color.NoColor = true | |
} | |
color.NoColor = !opts.Color |
@ch1aki Thank you! I've commented. |
@ch1aki Thank you! merged. This will be released in v2.4. |
I want to easily disable terminal formatting sequences when automatically commenting on a PR with the results of ecspresso diff, using tools like suzuki-shunsuke/github-comment."
colorized
no color