X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=stdlib%2Fprelude.sh;h=fcd1baca903482a7fcc52d346f198db2edf7a4bf;hb=5e13f1e2a3dc1237fcf2fa141d8379bdd36bde61;hp=5b42f4ed8c0a217665f6539677d96862903e85a1;hpb=a48b05d35f0646322e8178ff10f8ed7af3e739aa;p=goals.git diff --git a/stdlib/prelude.sh b/stdlib/prelude.sh index 5b42f4e..fcd1bac 100644 --- a/stdlib/prelude.sh +++ b/stdlib/prelude.sh @@ -24,5 +24,16 @@ function quoted_string () { # XXX This doesn't actually do quoting XXX - echo "\"$1\"" + 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" }