prin: Fix bold not working, Add prin tests to travis
This commit is contained in:
parent
00f22df3c8
commit
462d4c594a
1 changed files with 8 additions and 5 deletions
13
neofetch
13
neofetch
|
@ -2348,13 +2348,10 @@ info() {
|
||||||
# Prin {{{
|
# Prin {{{
|
||||||
|
|
||||||
prin() {
|
prin() {
|
||||||
string="$1${2:+: $2}"
|
string="${1//$'\033[0m'}${2:+: $2}"
|
||||||
|
|
||||||
# If $2 doesn't exist we format $1 as info
|
# If $2 doesn't exist we format $1 as info
|
||||||
if [ -z "$2" ]; then
|
[ -z "$2" ] && local subtitle_color="$info_color"
|
||||||
local subtitle_color="$info_color"
|
|
||||||
bold=
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Format the output
|
# Format the output
|
||||||
string="${string/:/${reset}${colon_color}:${info_color}}"
|
string="${string/:/${reset}${colon_color}:${info_color}}"
|
||||||
|
@ -3194,6 +3191,12 @@ getargs() {
|
||||||
info "$(tr '[:lower:]' '[:upper:]' <<< "$func")" "$func"
|
info "$(tr '[:lower:]' '[:upper:]' <<< "$func")" "$func"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
info linebreak
|
||||||
|
|
||||||
|
prin "PRIN TEST" "$(color 1)1$(color 2)2$(color 3)3"
|
||||||
|
prin "SUBTITLE"
|
||||||
|
prin "$(color 5)SUBTITLE2"
|
||||||
|
|
||||||
info linebreak
|
info linebreak
|
||||||
info cols
|
info cols
|
||||||
info linebreak
|
info linebreak
|
||||||
|
|
Loading…
Reference in a new issue