Skip to content
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

[feature] support --color=auto #377

Open
Freed-Wu opened this issue Sep 20, 2021 · 1 comment
Open

[feature] support --color=auto #377

Freed-Wu opened this issue Sep 20, 2021 · 1 comment
Labels

Comments

@Freed-Wu
Copy link

--color=never is equivalent with --color, --color=always is equivalent with --no-color, when the output is stdout, --color=auto = --color=always, when output is not stdout (such as a file), --color=auto = --color=never.

@blueyed
Copy link
Member

blueyed commented Sep 28, 2021

Just for reference: --color is a boolean flag currently, and therefore not easily changeable into an options with arguments (at least when --color auto should/would also work as --color=auto).
Code ref:

vint/vint/linting/cli.py

Lines 101 to 102 in 471e70b

parser.add_argument('-c', '--color', action='store_const', const=True, help='colorize output when possible')
parser.add_argument('--no-color', action='store_const', const=True, help='do not colorize output')

Therefore color could be auto-detected maybe with neither of the flags being given maybe?

Also in this regard: support for $NO_COLOR (https://no-color.org/).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants