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

Add "tty-p" command to allow analysis #3

Open
pnathan opened this issue Mar 9, 2013 · 3 comments
Open

Add "tty-p" command to allow analysis #3

pnathan opened this issue Mar 9, 2013 · 3 comments

Comments

@pnathan
Copy link
Owner

pnathan commented Mar 9, 2013

https://twitter.com/jschauma/status/309781450398507010

"Unix tool writers: it'd be swell if you could not print ^[[0;33color code^[[0m escape sequences if output does not in fact go to a tty."

This indicates that a TTY-P needs to be implemented to allow library users to not output ansi-codes if they do not want to.

OSX 10.8 tty command has this definition:

The tty utility exits 0 if the standard input is a terminal, 1 if the standard input is not a terminal, and >1 if an error occurs.

Adding external-program as a dependency and invoking tty should gather the requisite information.

@pnathan
Copy link
Owner Author

pnathan commented Mar 10, 2013

Interestingly, running (external-program:run "tty") on a non-SLIME Linux SBCL 1.1.4 informs me that it's not a tty.

However, this same environment renders to the user's screen and interprets the ANSI codes quite well.

@mrkkrp
Copy link

mrkkrp commented Jan 7, 2015

I'm not sure, but you can also try interactive-stream-p.

@pnathan
Copy link
Owner Author

pnathan commented Jan 10, 2015

@mrkkrp H'm! I'll have to give that a spin.

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

2 participants