From 4278f4b5a7c5195f677d53cb60ec67a89f760868 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Fri, 28 Jun 2024 14:40:50 +0200 Subject: [PATCH] docs(cli): mention IsTerminal in cli::printing --- members/libpt-cli/src/lib.rs | 1 + members/libpt-cli/src/printing.rs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/members/libpt-cli/src/lib.rs b/members/libpt-cli/src/lib.rs index 1740407..ce9ade6 100644 --- a/members/libpt-cli/src/lib.rs +++ b/members/libpt-cli/src/lib.rs @@ -9,3 +9,4 @@ pub use dialoguer; pub use indicatif; pub use exitcode; pub use human_panic; + diff --git a/members/libpt-cli/src/printing.rs b/members/libpt-cli/src/printing.rs index bcb1bd4..aed4fc7 100644 --- a/members/libpt-cli/src/printing.rs +++ b/members/libpt-cli/src/printing.rs @@ -3,6 +3,10 @@ //! This module provides functions for formatting content with borders and colors, printing them to the console. //! The functions in this module are designed to simplify the process of creating visually appealing //! output for CLI applications. +//! +//! Note that most of the utilities in this module are focused on communication with humans, not +//! with machines. Consider evaluating [std::io::IsTerminal] before using colorful, dynamic and bordered +//! printing. use comfy_table::presets; use comfy_table::{CellAlignment, ContentArrangement, Table};