File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change 22
33set -eu
44
5- script_path=" $( cd -P " $( dirname " $( readlink -f " $0 " ) " ) " && cd .. && pwd ) "
6-
75msgsh=" $( cd -P " $( dirname " $( readlink -f " $0 " ) " ) " && pwd ) /$( basename " ${0} " ) "
86
97msg_type=" info"
108echo_opts=()
119bash_debug=false
1210nocolor=false
1311
14-
1512# appname
1613appname=" msg.sh"
1714noappname=false
@@ -91,6 +88,7 @@ text() {
9188 f) _decotypes=" ${_decotypes} ;5" ;;
9289 l) _decotypes=" ${_decotypes} ;4" ;;
9390 n) _decotypes=" ${_decotypes} ;0" ;;
91+ * ) msg_error " Wrong use of text function" ;;
9492 esac
9593 done
9694 shift " $(( OPTIND - 1 )) "
@@ -286,15 +284,16 @@ case "${1-""}" in
286284esac
287285
288286word_count=" ${# msg_label} "
289- message=" ${@ } "
287+ message=" ${* } "
290288
291289echo_type () {
292- local i
293290 if [[ " ${nolabel} " = false ]]; then
294291 if [[ " ${noadjust} " = false ]]; then
295- for i in $( seq 1 " $(( label_space - word_count)) " ) ; do
296- echo -ne " ${adjust_chr} "
297- done
292+ yes " ${adjust_chr} " 2> /dev/null | head -n " $(( label_space - word_count)) " | tr -d " \n"
293+ # local i
294+ # for i in $( seq 1 "$(( label_space - word_count))" ); do
295+ # echo -ne "${adjust_chr}"
296+ # done
298297 fi
299298 text -c " ${labelcolor} " " ${msg_label} "
300299 fi
@@ -308,7 +307,7 @@ echo_appname() {
308307
309308# echo_message <message>
310309echo_message () {
311- if [[ " ${textcolor } " = " white " ]]; then
310+ if [[ " ${customized_text_color } " = false ]]; then
312311 text -n " ${1} "
313312 else
314313 text -c " ${textcolor} " " ${1} "
You can’t perform that action at this time.
0 commit comments