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