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

Colors in output #44

Open
Manfred opened this issue Jun 20, 2013 · 9 comments
Open

Colors in output #44

Manfred opened this issue Jun 20, 2013 · 9 comments
Milestone

Comments

@Manfred
Copy link
Collaborator

Manfred commented Jun 20, 2013

I think some test runners try to detect where they're writing to and possibly don't include ANSI colors when running through Kicker cough rspec cough. The problem is that output coming from Kicker is all black, and I like my colors.

How to reproduce: kicker -r ruby in any directory with specs. Change a file.

@alloy
Copy link
Owner

alloy commented Jun 20, 2013

I agree that this would be nice. Basically, the stdin that’s passed to the spawned process should be a TTY.

PS I think you can pass the --color option to rspec and it will not perform the automatic check.

@Manfred
Copy link
Collaborator Author

Manfred commented Jun 20, 2013

Right, I tried --color, but it didn't work. This was with RSpec 1.2 though, so it might be better with newer versions.

@raine
Copy link

raine commented Sep 5, 2013

I'd like this.

@Manfred
Copy link
Collaborator Author

Manfred commented Dec 3, 2013

I'm experimenting with a PTY for version 4.0.

@kylef
Copy link

kylef commented Oct 21, 2015

Most tools use the isatty to determine if it's a TTY and if so, uses ANSI (colour) codes. To support these tools by default, we would need to somehow make the subprocesses stdout and stderr file descriptors cause isatty to return 1 in the subprocess.

I'm kind stuck on how to go about this, but would love to make a pull request if anyone has an pointers how to go about this. @Manfred you mentioned experimenting with a PTY, did you get any success with this?

@alloy
Copy link
Owner

alloy commented Oct 22, 2015

@kylef This is the PTY stdlib module, which should do the job: http://apidock.com/ruby/v1_9_3_392/PTY/spawn/class

@Manfred
Copy link
Collaborator Author

Manfred commented Oct 22, 2015

@kylef
Copy link

kylef commented Oct 25, 2015

@Manfred Alright, not sure what the status of your separate "Four" repository. If I were to back port the PTY changes into a PR for the current kicker would this likely get merged/released?

@Manfred
Copy link
Collaborator Author

Manfred commented Oct 26, 2015

@kylef I created the fork because I didn't like all the dependencies on the watcher libraries. My branch has a slightly different implementation of Recipes so it's not compatible.

I think it's probably best to reverse implement features onto the 3.x version. So yeah, if you implement PTY we will merge and release.

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

4 participants