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

Turn formatting on/off #6

Closed
mastacheata opened this issue Oct 27, 2015 · 5 comments
Closed

Turn formatting on/off #6

mastacheata opened this issue Oct 27, 2015 · 5 comments

Comments

@mastacheata
Copy link

I've been trying the library on windows and that doesn't support the bold or colored items you have in there by default. It would be great if there was a way to turn that off without having to fiddle with the libraries code.

@tburry
Copy link
Contributor

tburry commented Oct 28, 2015

You can turn formatting off with the following code:

$cli = new Cli();
$cli->format = false;

I look into a way of turning formatting off by default on Windows.

@tburry
Copy link
Contributor

tburry commented Oct 28, 2015

Can you tell me what the output of the following command is on your Windows terminal?

echo shell_exec('tput colors 2> output');

@mastacheata
Copy link
Author

On my computer it prints 8 and puts nothing in the file.
BUT: I have the Git / MingW64 tools (a bundle of common cli tools from *nix systems as windows exe files)
Even though it prints out the number and is available it can't overcome the limitation of Windows CMD no longer supporting ANSI escape sequences (no longer here means since the release of Windows 95, more than 20 years ago)

You're probably more interested in what SHOULD happen, and that is something along the lines of this command doesn't exist being printed to the output file.
My Widnows is set to German language, though, so this is what the output file contains:

Der Befehl "tput" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

I can very well live with turning it off by hand, though...

@tburry
Copy link
Contributor

tburry commented Oct 28, 2015

Okay thanks for the info. I'm going to think about whether or not to add the default based solely on the OS being Windows. It sounds sensible, but then someone will come along with Cygwin.

@yakatz
Copy link
Contributor

yakatz commented Dec 22, 2017

Windows 10 now supports colors in conhost, so it would be nice to revisit this.

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

No branches or pull requests

3 participants