aboutsummaryrefslogtreecommitdiff
path: root/script/helpers/text_helpers
diff options
context:
space:
mode:
Diffstat (limited to 'script/helpers/text_helpers')
-rw-r--r--script/helpers/text_helpers32
1 files changed, 32 insertions, 0 deletions
diff --git a/script/helpers/text_helpers b/script/helpers/text_helpers
new file mode 100644
index 0000000..34b77a8
--- /dev/null
+++ b/script/helpers/text_helpers
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+
+# This file contains a set of functions used to format text,
+# and make printing text a little easier. Feel free to put
+# any additional functions you need for formatting your shell
+# output text.
+
+# Colors
+BOLD_RED_COLOR="\e[1m\e[31m"
+
+# Indents the text 2 spaces
+# example:
+# printf "Hello" | indent
+indent() {
+ while read LINE; do
+ echo " $LINE" || true
+ done
+}
+
+# Prints out an arrow to your custom notice
+# example:
+# notice "Installing new magic"
+notice() {
+ printf "\n▸ $1\n"
+}
+
+# Prints out a check mark and Done.
+# example:
+# print_done
+print_done() {
+ printf "✔ Done\n" | indent
+}