aboutsummaryrefslogtreecommitdiff
path: root/script/helpers/text_helpers
blob: 34b77a8c1c9b22905b8d4d9d6471d6c9521e12c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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
}