Expose supports_ansi (#489)

This commit is contained in:
sigmaSd 2020-09-17 13:36:08 +02:00 committed by GitHub
parent c6ffb3b8f9
commit 729f3c6931
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -50,6 +50,7 @@ lazy_static! {
}; };
} }
/// Checks if the current terminal supports ansi escape sequences
pub fn supports_ansi() -> bool { pub fn supports_ansi() -> bool {
*SUPPORTS_ANSI_ESCAPE_CODES *SUPPORTS_ANSI_ESCAPE_CODES
} }

View File

@ -250,7 +250,8 @@ pub mod tty;
mod ansi; mod ansi;
#[cfg(windows)] #[cfg(windows)]
pub(crate) mod ansi_support; /// A module that exposes one function to check if the current terminal supports ansi sequences.
pub mod ansi_support;
mod command; mod command;
mod error; mod error;
pub(crate) mod macros; pub(crate) mod macros;