From 729f3c6931920763325610180955ec35132d45f9 Mon Sep 17 00:00:00 2001 From: sigmaSd Date: Thu, 17 Sep 2020 13:36:08 +0200 Subject: [PATCH] Expose supports_ansi (#489) --- src/ansi_support.rs | 1 + src/lib.rs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ansi_support.rs b/src/ansi_support.rs index 026fba5..b473fb8 100644 --- a/src/ansi_support.rs +++ b/src/ansi_support.rs @@ -50,6 +50,7 @@ lazy_static! { }; } +/// Checks if the current terminal supports ansi escape sequences pub fn supports_ansi() -> bool { *SUPPORTS_ANSI_ESCAPE_CODES } diff --git a/src/lib.rs b/src/lib.rs index 4be6f01..37ab6fd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -250,7 +250,8 @@ pub mod tty; mod ansi; #[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 error; pub(crate) mod macros;