Skip to content

when TERM=dumb, the output is colorless #847#963

Merged
kbknapp merged 7 commits intoclap-rs:masterfrom
nateozem:feature/comply-terminfo
May 29, 2017
Merged

when TERM=dumb, the output is colorless #847#963
kbknapp merged 7 commits intoclap-rs:masterfrom
nateozem:feature/comply-terminfo

Conversation

@nateozem
Copy link
Copy Markdown
Contributor

@nateozem nateozem commented May 17, 2017

This change is Reviewable

@mention-bot
Copy link
Copy Markdown

@nateozem, thanks for your PR! By analyzing the history of the files in this pull request, we identified @kbknapp, @tormol and @pkgw to be potential reviewers.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.3%) to 92.142% when pulling 0129634 on nateozem:feature/comply-terminfo into 2923515 on kbknapp:master.

@kbknapp
Copy link
Copy Markdown
Member

kbknapp commented May 22, 2017

Thanks for knocking this out! It looks like Travis is failing from the use of the ? operator which wasn't available in 1.11.0 (minimum required to build clap).

Also, I'd prefer to find a way to check env::var once and not on every call or color!. Perhaps when Color.when is set initially?

@kbknapp
Copy link
Copy Markdown
Member

kbknapp commented May 22, 2017

The ? issue seems to come from unicode-segmentation so I'll have to update the Cargo.toml to unicode-segmentation = "~1.1" which should solve that issue (feel free to just add a commit doing this to this PR). 😄

@mgeisler
Copy link
Copy Markdown
Contributor

I happened to fix the unicode-segmentation issue in parallel in #967 :-)

@nateozem
Copy link
Copy Markdown
Contributor Author

@kbknapp, with the latest changes, don't know if you mind the new implementation. I figured that the ColorizerOption would be good for adding more options if needed. It separates the logic between the model and the controller.
I wasn't sure if it would be better to privatize the properties in Colorizer and/or removing the properties to be replace by the option itself. Last note, I do plan on cleaning it up.

Please let me know if anyone has suggestions.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.3%) to 92.152% when pulling c07ab0b on nateozem:feature/comply-terminfo into 2923515 on kbknapp:master.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.3%) to 92.161% when pulling b90d307 on nateozem:feature/comply-terminfo into 2923515 on kbknapp:master.

@kbknapp
Copy link
Copy Markdown
Member

kbknapp commented May 29, 2017

Sorry for the late replies, I've been out of town. This looks good, thanks for the patience with me! 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants