Open Manfred opened 11 years ago
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.
Right, I tried --color
, but it didn't work. This was with RSpec 1.2 though, so it might be better with newer versions.
I'd like this.
I'm experimenting with a PTY for version 4.0.
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?
@kylef This is the PTY stdlib module, which should do the job: http://apidock.com/ruby/v1_9_3_392/PTY/spawn/class
@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?
@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.
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.