|
@@ -0,0 +1,27 @@
|
|
1
|
+#!/bin/bash
|
|
2
|
+
|
|
3
|
+#
|
|
4
|
+# Name of prerry-printer module
|
|
5
|
+#
|
|
6
|
+# Friendly name of module used for decorating output. For
|
|
7
|
+# example, if the value is NAME, a mkpretty_NAME module must
|
|
8
|
+# exist and be importable. Otherwise mkpretty will fall back
|
|
9
|
+# to plain, which is also the default value.
|
|
10
|
+#
|
|
11
|
+FFOO_MKPRETTY=${FFOO_MKPRETTY:-plain}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+__ffoo_mkpretty__init() {
|
|
15
|
+ #
|
|
16
|
+ # Import proper submodule
|
|
17
|
+ #
|
|
18
|
+ if ffoo try_import mkpretty_${FFOO_MKPRETTY};
|
|
19
|
+ then
|
|
20
|
+ ffoo import mkpretty_${FFOO_MKPRETTY}
|
|
21
|
+ return 0
|
|
22
|
+ else
|
|
23
|
+ warn "falling back to mkpretty_plain"
|
|
24
|
+ FFOO_MKPRETTY=plain
|
|
25
|
+ ffoo import mkpretty_${FFOO_MKPRETTY}
|
|
26
|
+ fi
|
|
27
|
+}
|