diff --git a/doc/builtins.md b/doc/builtins.md index 0a632c1..46f874a 100644 --- a/doc/builtins.md +++ b/doc/builtins.md @@ -1,6 +1,6 @@ # Builtins Reference -[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) +[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) ## absolute @@ -59,6 +59,32 @@ Examples: # get version of last release: - 'VERSION = changelog("")[0].Version' +## color + +Colorize string. + +Arguments: + +- The name of the color (black, red, green, yellow, blue, magenta, cyan or white). +- The string to colorize. + +Color capitalization determines the intensity of the color: + +- Use standard color names (such as black) for normal colors. +- Use capitalized color names (such as Black) for bold colors. +- Use uppercase color names (such as BLACK) for bold background colors. +- Use uncapitalized uppercase color names (such as bLACK) for background colors. + +Returns: + +- The colorized string. + +Examples: + + # green message + color("green", "OK") + # returns: string "OK" colorized in green + ## contains Contains strings. @@ -221,7 +247,7 @@ Arguments: Returns: -- Files as a list of strings. +- Files as a sorted list of strings. Examples: