summaryrefslogtreecommitdiff
path: root/cli/colors.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-02-18 10:08:18 -0500
committerGitHub <noreply@github.com>2020-02-18 10:08:18 -0500
commit302debebb3a3b765b3d13f3244eb4625d7d610c2 (patch)
treed54b4d01f391f7396e8f1c92dc2e05c82acc2a8c /cli/colors.rs
parent5a3292047c42b8a65d164f127fc57e57046fadf7 (diff)
refactor: cleanup cli/lib.rs (#4006)
* rename methods on Worker related to module loading * reorganize cli/lib.rs * remove cli/progress.rs and cli/shell.rs
Diffstat (limited to 'cli/colors.rs')
-rw-r--r--cli/colors.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/cli/colors.rs b/cli/colors.rs
index f792e2b33..0bf048943 100644
--- a/cli/colors.rs
+++ b/cli/colors.rs
@@ -78,6 +78,14 @@ pub fn red(s: String) -> impl fmt::Display {
style.paint(s)
}
+pub fn green(s: String) -> impl fmt::Display {
+ let mut style = Style::new();
+ if use_color() {
+ style = style.fg(Fixed(10)).bold();
+ }
+ style.paint(s)
+}
+
pub fn bold(s: String) -> impl fmt::Display {
let mut style = Style::new();
if use_color() {