git.annexia.org
/
goals.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stdlib: Change print colour functions so they are atomic.
[goals.git]
/
stdlib
/
prelude.sh
diff --git
a/stdlib/prelude.sh
b/stdlib/prelude.sh
index
254c380
..
fcd1bac
100644
(file)
--- a/
stdlib/prelude.sh
+++ b/
stdlib/prelude.sh
@@
-27,22
+27,13
@@
function quoted_string ()
echo -n "\"$1\""
}
echo -n "\"$1\""
}
-# For printing strings in different colours
, use these functions
.
-function
star
t_red ()
+# For printing strings in different colours.
+function
prin
t_red ()
{
{
- echo -
ne "\x1b[1;31
m"
+ echo -
e "\x1b[1;31m$@\x1b[0
m"
}
}
-function
star
t_green ()
+function
prin
t_green ()
{
{
- echo -ne "\x1b[0;32m"
-}
-
-function end_colour ()
-{
- echo -ne "\x1b[0m"
-}
-function end_color ()
-{
- echo -ne "\x1b[0m"
+ echo -e "\x1b[0;32m$@\x1b[0m"
}
}