Skip to content

Commit a9224b2

Browse files
author
Michel Casabianca
committed
Updated builtins reference
1 parent 93dd488 commit a9224b2

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

doc/builtins.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Builtins Reference
22

3-
[absolute](#absolute) - [appendpath](#appendpath) - [changelog](#changelog) - [contains](#contains) - [directory](#directory) - [env](#env) - [escapeurl](#escapeurl) - [exists](#exists) - [expand](#expand) - [filename](#filename) - [filter](#filter) - [find](#find) - [findinpath](#findinpath) - [followlink](#followlink) - [greater](#greater) - [greaterorequal](#greaterorequal) - [haskey](#haskey) - [join](#join) - [joinpath](#joinpath) - [jsondecode](#jsondecode) - [jsonencode](#jsonencode) - [keys](#keys) - [length](#length) - [list](#list) - [lower](#lower) - [lowercase](#lowercase) - [lowerorequal](#lowerorequal) - [match](#match) - [md5](#md5) - [newer](#newer) - [now](#now) - [ospath](#ospath) - [read](#read) - [replace](#replace) - [run](#run) - [setenv](#setenv) - [sortversions](#sortversions) - [split](#split) - [termwidth](#termwidth) - [throw](#throw) - [title](#title) - [toint](#toint) - [trim](#trim) - [unescapeurl](#unescapeurl) - [unixpath](#unixpath) - [uppercase](#uppercase) - [uuid](#uuid) - [windowspath](#windowspath) - [winexe](#winexe) - [yamldecode](#yamldecode) - [yamlencode](#yamlencode)
3+
[absolute](#absolute) - [appendpath](#appendpath) - [changelog](#changelog) - [color](#color) - [contains](#contains) - [directory](#directory) - [env](#env) - [escapeurl](#escapeurl) - [exists](#exists) - [expand](#expand) - [filename](#filename) - [filter](#filter) - [find](#find) - [findinpath](#findinpath) - [followlink](#followlink) - [greater](#greater) - [greaterorequal](#greaterorequal) - [haskey](#haskey) - [join](#join) - [joinpath](#joinpath) - [jsondecode](#jsondecode) - [jsonencode](#jsonencode) - [keys](#keys) - [length](#length) - [list](#list) - [lower](#lower) - [lowercase](#lowercase) - [lowerorequal](#lowerorequal) - [match](#match) - [md5](#md5) - [newer](#newer) - [now](#now) - [ospath](#ospath) - [read](#read) - [replace](#replace) - [run](#run) - [setenv](#setenv) - [sortversions](#sortversions) - [split](#split) - [termwidth](#termwidth) - [throw](#throw) - [title](#title) - [toint](#toint) - [trim](#trim) - [unescapeurl](#unescapeurl) - [unixpath](#unixpath) - [uppercase](#uppercase) - [uuid](#uuid) - [windowspath](#windowspath) - [winexe](#winexe) - [yamldecode](#yamldecode) - [yamlencode](#yamlencode)
44

55
## absolute
66

@@ -59,6 +59,32 @@ Examples:
5959
# get version of last release:
6060
- 'VERSION = changelog("")[0].Version'
6161

62+
## color
63+
64+
Colorize string.
65+
66+
Arguments:
67+
68+
- The name of the color (black, red, green, yellow, blue, magenta, cyan or white).
69+
- The string to colorize.
70+
71+
Color capitalization determines the intensity of the color:
72+
73+
- Use standard color names (such as black) for normal colors.
74+
- Use capitalized color names (such as Black) for bold colors.
75+
- Use uppercase color names (such as BLACK) for bold background colors.
76+
- Use uncapitalized uppercase color names (such as bLACK) for background colors.
77+
78+
Returns:
79+
80+
- The colorized string.
81+
82+
Examples:
83+
84+
# green message
85+
color("green", "OK")
86+
# returns: string "OK" colorized in green
87+
6288
## contains
6389

6490
Contains strings.
@@ -221,7 +247,7 @@ Arguments:
221247

222248
Returns:
223249

224-
- Files as a list of strings.
250+
- Files as a sorted list of strings.
225251

226252
Examples:
227253

0 commit comments

Comments
 (0)