Stebalien / term

A Rust library for terminfo parsing and terminal colors.
https://stebalien.github.io/doc/term/term/
Apache License 2.0
178 stars 49 forks source link

Fallback on basic ANSI terminal support. #71

Closed Stebalien closed 7 years ago

Stebalien commented 7 years ago

Fixes #44

Stebalien commented 7 years ago

/cc @Parakleta, @alexcrichton, @alexreg, @cmr

Thoughts? This should fix term on FreeBSD (and should make it more reliably color output everywhere). I'll get around to my new shiny version someday but that could take a while.


Basically, if looking up the terminfo database fails, term will now check to see if the terminal name matches a known ANSI-capable terminal name (by prefix). If it does, it uses a predefined minimal ANSI termcap definition.

alexreg commented 7 years ago

Looks good. I appreciate that full support on BSD-like systems will take a lot of effort, but this will hold us over for now. :)

Parakleta commented 7 years ago

I don't have an active rust project to test this against for now so I don't have any feedback, but I wanted to say thanks for the effort.

alexcrichton commented 7 years ago

Seems reasonable!