From ddb7d978b83a891e16d037a060bb9bb139152fcf Mon Sep 17 00:00:00 2001 From: johannst Date: Wed, 4 Apr 2018 19:37:08 +0900 Subject: fixed colored printes by quoting the message string, else msg is truncated after first word --- bashrc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bashrc b/bashrc index f7d5d4c..2738760 100644 --- a/bashrc +++ b/bashrc @@ -133,20 +133,20 @@ function pline() { function pinfo() { local msg=$1 local tag=${2:-INFO} - pline ${BCol_BrightGreen} $tag ${msg} + pline ${BCol_BrightGreen} $tag "${msg}" } function pwarn () { local msg=$1 local tag=${2:-WARN} - pline ${BCol_YellowOrange} $tag ${msg} + pline ${BCol_YellowOrange} $tag "${msg}" } function perr() { local msg=$1 local exit=${2:-exit} local tag=${3:-ERR} - pline ${BCol_BrightRed} $tag ${msg} + pline ${BCol_BrightRed} $tag "${msg}" [[ "$exit" == "exit" ]] && exit 1 || return 0 } -- cgit v1.2.3