diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2016-11-10 20:17:31 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2016-11-10 20:19:42 +0100 |
| commit | 05f1a76de6fc69a8b454909c0a0358ec14f8f407 (patch) | |
| tree | ef59302656dbda818b0abff35f3c7fd0eeeac40a /.bashprompt | |
| parent | 275a9d513efec4f7f449e2b311b68c1965007c15 (diff) | |
| download | dotfiles-05f1a76de6fc69a8b454909c0a0358ec14f8f407.tar.xz | |
(m) Echo directly instead of concatenating
Diffstat (limited to '.bashprompt')
| -rw-r--r-- | .bashprompt | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/.bashprompt b/.bashprompt index 9728a3a..08bedae 100644 --- 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 () |
