X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=stdlib%2Fprelude.sh;h=fcd1baca903482a7fcc52d346f198db2edf7a4bf;hb=bed4036653ce47a91b96dd0ead65341aa80d6b97;hp=60d5b9f6843aeda9ad082d35c60fc5cdfcba04d0;hpb=ca19d10dfd7e3e3c690f5d618d5fc24a0d14accc;p=goals.git diff --git a/stdlib/prelude.sh b/stdlib/prelude.sh index 60d5b9f..fcd1bac 100644 --- a/stdlib/prelude.sh +++ b/stdlib/prelude.sh @@ -26,3 +26,14 @@ function quoted_string () # XXX This doesn't actually do quoting XXX echo -n "\"$1\"" } + +# For printing strings in different colours. +function print_red () +{ + echo -e "\x1b[1;31m$@\x1b[0m" +} + +function print_green () +{ + echo -e "\x1b[0;32m$@\x1b[0m" +}