commit 05f1a76de6fc69a8b454909c0a0358ec14f8f407 parent 275a9d513efec4f7f449e2b311b68c1965007c15 Author: KΓ©vin Le Gouguec <kevin.legouguec@gmail.com> Date: Thu, 10 Nov 2016 20:17:31 +0100 (m) Echo directly instead of concatenating Diffstat:
| M | .bashprompt | | | 22 | ++++++++++------------ |
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/.bashprompt b/.bashprompt @@ -82,29 +82,27 @@ __fontify () local text=$1 shift - local output=$(__start-nonprinting) - output+='\E[' + __start-nonprinting + echo -en '\E[' for ((i=1; i<=$#; i++)) do - output+=${codes[${!i}]} + echo -en ${codes[${!i}]} if ((i<$#)) then - output+=';' + echo -en ';' else - output+='m' + echo -en 'm' fi done - output+=$(__end-nonprinting) + __end-nonprinting - output+="${text}" - output+=$(__start-nonprinting) - output+='\E[0m' - output+=$(__end-nonprinting) - - echo -en "${output}" + echo -en "${text}" + __start-nonprinting + echo -en '\E[0m' + __end-nonprinting } __set-prompt ()