Added '--underline on/off' and '' to toggle it
This commit is contained in:
parent
941c556012
commit
a80d50b0ff
|
@ -196,6 +196,10 @@ line_wrap="on"
|
||||||
# --bold on/off
|
# --bold on/off
|
||||||
bold="on"
|
bold="on"
|
||||||
|
|
||||||
|
# Enable/Disable Underline
|
||||||
|
# --underline on/off
|
||||||
|
underline="on"
|
||||||
|
|
||||||
# Underline character
|
# Underline character
|
||||||
# --underline_char char
|
# --underline_char char
|
||||||
underline_char="-"
|
underline_char="-"
|
||||||
|
|
10
fetch
10
fetch
|
@ -216,6 +216,10 @@ line_wrap="on"
|
||||||
# --bold on/off
|
# --bold on/off
|
||||||
bold="on"
|
bold="on"
|
||||||
|
|
||||||
|
# Enable/Disable Underline
|
||||||
|
# --underline on/off
|
||||||
|
underline="on"
|
||||||
|
|
||||||
# Underline character
|
# Underline character
|
||||||
# --underline_char char
|
# --underline_char char
|
||||||
underline_char="-"
|
underline_char="-"
|
||||||
|
@ -1827,8 +1831,13 @@ prin () {
|
||||||
# Underline {{{
|
# Underline {{{
|
||||||
|
|
||||||
getunderline () {
|
getunderline () {
|
||||||
|
case "$underline" in
|
||||||
|
"on")
|
||||||
underline=$(printf %"$length"s)
|
underline=$(printf %"$length"s)
|
||||||
underline=${underline// /$underline_char}
|
underline=${underline// /$underline_char}
|
||||||
|
;;
|
||||||
|
"off") underline="" ;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
@ -2087,6 +2096,7 @@ while [ "$1" ]; do
|
||||||
--info_color) info_color=$2 ;;
|
--info_color) info_color=$2 ;;
|
||||||
|
|
||||||
# Text Formatting
|
# Text Formatting
|
||||||
|
--underline) underline="$2" ;;
|
||||||
--underline_char) underline_char="$2" ;;
|
--underline_char) underline_char="$2" ;;
|
||||||
--line_wrap) line_wrap="$2" ;;
|
--line_wrap) line_wrap="$2" ;;
|
||||||
--bold) bold="$2" ;;
|
--bold) bold="$2" ;;
|
||||||
|
|
Reference in New Issue