bold: Rename bold() to get_bold()

This commit is contained in:
Dylan Araps 2016-11-13 21:29:25 +11:00
parent 2d0dbd2878
commit 2ab56e8570

View file

@ -2303,13 +2303,13 @@ info() {
err "Info: Couldn't detect $subtitle." && return err "Info: Couldn't detect $subtitle." && return
case "$1" in case "$1" in
title) "title")
string="${title_color}${bold}${output}" string="${title_color}${bold}${output}"
string="${string/@/${at_color}@${title_color}${bold}}" string="${string/@/${at_color}@${title_color}${bold}}"
length="${#output}" length="${#output}"
;; ;;
underline) string="${underline_color}${output}" ;; "underline") string="${underline_color}${output}" ;;
*) *)
string="${subtitle_color}${bold}${subtitle}${reset}" string="${subtitle_color}${bold}${subtitle}${reset}"
@ -2370,7 +2370,14 @@ get_underline() {
fi fi
} }
bold() { get_line_break() {
line_break=" "
# Calculate info height
info_height="$((info_height+=1))"
}
get_bold() {
case "$ascii_bold" in case "$ascii_bold" in
"on") ascii_bold="\033[1m" ;; "on") ascii_bold="\033[1m" ;;
"off") ascii_bold="" ;; "off") ascii_bold="" ;;
@ -2382,13 +2389,6 @@ bold() {
esac esac
} }
get_line_break() {
line_break=" "
# Calculate info height
info_height="$((info_height+=1))"
}
trim() { trim() {
# When a string is passed to 'echo' all trailing and leading # When a string is passed to 'echo' all trailing and leading
# whitespace is removed and inside the string multiple spaces are # whitespace is removed and inside the string multiple spaces are
@ -3121,7 +3121,7 @@ main() {
get_args "$@" get_args "$@"
old_flags old_flags
get_distro get_distro
bold get_bold
get_distro_colors get_distro_colors
# Restore cursor and clear screen on ctrl+c # Restore cursor and clear screen on ctrl+c