X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=stdlib%2Fprelude.sh;h=254c3803592a7570e11a89d15005d151dbeb19ce;hb=580298444204f92785a7ac78c4529e95e3cba40d;hp=60d5b9f6843aeda9ad082d35c60fc5cdfcba04d0;hpb=ca19d10dfd7e3e3c690f5d618d5fc24a0d14accc;p=goals.git diff --git a/stdlib/prelude.sh b/stdlib/prelude.sh index 60d5b9f..254c380 100644 --- a/stdlib/prelude.sh +++ b/stdlib/prelude.sh @@ -26,3 +26,23 @@ function quoted_string () # XXX This doesn't actually do quoting XXX echo -n "\"$1\"" } + +# For printing strings in different colours, use these functions. +function start_red () +{ + echo -ne "\x1b[1;31m" +} + +function start_green () +{ + echo -ne "\x1b[0;32m" +} + +function end_colour () +{ + echo -ne "\x1b[0m" +} +function end_color () +{ + echo -ne "\x1b[0m" +}