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

Check if running environment supports colored output #80

Closed
sebastianheuer opened this issue Sep 17, 2016 · 3 comments
Closed

Check if running environment supports colored output #80

sebastianheuer opened this issue Sep 17, 2016 · 3 comments

Comments

@sebastianheuer
Copy link
Member

sebastianheuer commented Sep 17, 2016

Currently UnixoidEnvironment::supportsColoredOuput() always returns true without really verifying that the current environment does actually support colors. This should be determined on runtime, maybe using tput colors.

@dnaber-de
Copy link
Contributor

Nice labeling to guide possible new contributors 👍 I'll start to put some effort on this the next days…

dnaber-de added a commit to dnaber-de/phive that referenced this issue Oct 1, 2016
for UnixoidEnvironemt::supportsColoredOutput()
dnaber-de added a commit to dnaber-de/phive that referenced this issue Oct 1, 2016
dnaber-de added a commit to dnaber-de/phive that referenced this issue Oct 2, 2016
@sebastianbergmann
Copy link
Member

@dnaber-de
Copy link
Contributor

From SebastianBergman\Environment\Console::hasColorSupport():

    if (DIRECTORY_SEPARATOR == '\\') {
        return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI') || 'xterm' === getenv('TERM');
    }

Is that for Windows OS? If so, it could be a possible implementation for WindowsEnvironment::supportsColoredOutput() which currently returns always false.

@sebastianheuer sebastianheuer added this to the 0.7.0 milestone Oct 14, 2016
@theseer theseer modified the milestones: 0.7.0, 0.6.3 Feb 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants