aboutsummaryrefslogtreecommitdiff
path: root/src/clients/cave/format_string.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/clients/cave/format_string.cc')
-rw-r--r--src/clients/cave/format_string.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/clients/cave/format_string.cc b/src/clients/cave/format_string.cc
index 58b3f51d1..25e3a73fd 100644
--- a/src/clients/cave/format_string.cc
+++ b/src/clients/cave/format_string.cc
@@ -18,6 +18,7 @@
*/
#include "format_string.hh"
+#include "format_user_config.hh"
#include <paludis/util/map-impl.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/tokeniser.hh>
@@ -144,6 +145,14 @@ paludis::cave::format_string(
throw FormatStringError(f, "{if} parameter '" + tokens.at(1) + "' not a variable");
condition_stack.push_front(! m->find(tokens.at(1).at(0))->second.empty());
}
+ else if ("colour" == tokens.at(0))
+ {
+ if (tokens.size() != 2)
+ throw FormatStringError(f, "{colour} takes one parameter");
+
+ if (*condition_stack.begin())
+ result.append(FormatUserConfigFile::get_instance()->fetch(tokens.at(1), 0, ""));
+ }
else
throw FormatStringError(f, "unknown command '" + tokens.at(0) + "' inside {}");