Skip to content

Unused functions

🛠️ Tools · ⬅ Home


Hides these from New and uncategorized functions

versionSort

undocumented

Usage

versionSort

No documentation for versionSort.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

isUpToDate

undocumented

Usage

isUpToDate

No documentation for isUpToDate.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

hostnameFull

undocumented

Usage

hostnameFull

No documentation for hostnameFull.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

ipLookup

undocumented

Usage

ipLookup

No documentation for ipLookup.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

dotEnvConfigure

Load .env and optional .env.local into bash context

Usage

dotEnvConfigure [ where ] [ --help ]

Loads .env which is the current project configuration file Also loads .env.local if it exists Generally speaking - these are NAME=value files and should be parsable by bash and other languages. Requires the file .env to exist and is loaded via bash source and all variables are exported in the current shell context. If .env.local exists, it is also loaded in a similar manner. Use with caution on trusted content only.

Arguments

  • where - Directory. Optional. Where to load the .env files.
  • --help - Flag. Optional. Display this help.

Return codes

  • 1 - if .env does not exist; outputs an error
  • 0 - if files are loaded successfully

cannon

undocumented

Usage

cannon

No documentation for cannon.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

pluralWord

undocumented

Usage

pluralWord

No documentation for pluralWord.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

plural

undocumented

Usage

plural

No documentation for plural.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

newlineHide

undocumented

Usage

newlineHide

No documentation for newlineHide.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

usageDocument

undocumented

Usage

usageDocument

No documentation for usageDocument.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

usageDocumentSimple

undocumented

Usage

usageDocumentSimple

No documentation for usageDocumentSimple.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

consoleHeadingBoxed

Text heading decoration

Usage

consoleHeadingBoxed [ --outside outsideStyle ] [ --inside insideStyle ] [ --shrink characterCount ] [ --size lineCount ] [ text ... ] [ --help ]

Heading for section output

Arguments

  • --outside outsideStyle - String. Optional. Style to apply to the outside border. (Default decoration)
  • --inside insideStyle - String. Optional. Style to apply to the inside spacing. (Default blank)
  • --shrink characterCount - UnsignedInteger. Optional. Reduce the box by this many characters wide. (Default 0)
  • --size lineCount - UnsignedInteger. Optional. Print this many blank lines between the header and title. (Default 1)
  • text ... - Text to put in the box
  • --help - Flag. Optional. Display this help.

Examples

consoleHeadingBoxed Moving ...

Sample Output

+==========================================================================+
|                                                                          |
| Moving ...                                                               |
|                                                                          |
+==========================================================================+

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

loadAverage

undocumented

Usage

loadAverage

No documentation for loadAverage.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

loopExecute

undocumented

Usage

loopExecute

No documentation for loopExecute.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

lowercase

undocumented

Usage

lowercase

No documentation for lowercase.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

uppercase

undocumented

Usage

uppercase

No documentation for uppercase.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

randomString

undocumented

Usage

randomString

No documentation for randomString.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

rotateLog

undocumented

Usage

rotateLog

No documentation for rotateLog.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

rotateLogs

undocumented

Usage

rotateLogs

No documentation for rotateLogs.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

shaPipe

undocumented

Usage

shaPipe

No documentation for shaPipe.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

usageRequireBinary

undocumented

Usage

usageRequireBinary

No documentation for usageRequireBinary.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

usageRequireEnvironment

undocumented

Usage

usageRequireEnvironment

No documentation for usageRequireEnvironment.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

veeGitTag

undocumented

Usage

veeGitTag

No documentation for veeGitTag.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

watchDirectory

undocumented

Usage

watchDirectory

No documentation for watchDirectory.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

parseBoolean

undocumented

Usage

parseBoolean

No documentation for parseBoolean.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

clampDigits

undocumented

Usage

clampDigits

No documentation for clampDigits.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

replaceFirstPattern

undocumented

Usage

replaceFirstPattern

No documentation for replaceFirstPattern.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

stringReplace

undocumented

Usage

stringReplace

No documentation for stringReplace.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

trimBoth

undocumented

Usage

trimBoth

No documentation for trimBoth.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

trimHead

undocumented

Usage

trimHead

No documentation for trimHead.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

trimTail

undocumented

Usage

trimTail

No documentation for trimTail.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

singleBlankLines

undocumented

Usage

singleBlankLines

No documentation for singleBlankLines.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

trimRightSpace

undocumented

Usage

trimRightSpace

No documentation for trimRightSpace.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

trimLeftSpace

undocumented

Usage

trimLeftSpace

No documentation for trimLeftSpace.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

trimSpace

undocumented

Usage

trimSpace

No documentation for trimSpace.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

removeFields

undocumented

Usage

removeFields

No documentation for removeFields.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

hasHook

undocumented

Usage

hasHook

No documentation for hasHook.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

isSubstring

undocumented

Usage

isSubstring

No documentation for isSubstring.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

isSubstringInsensitive

undocumented

Usage

isSubstringInsensitive

No documentation for isSubstringInsensitive.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

darkLight

Show dark and light mode

Usage

darkLight

Show dark and light mode

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

filesOpenStatus

Output current open files

Usage

filesOpenStatus

Output current open files stdout

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

findUncaughtAssertions

undocumented

Usage

findUncaughtAssertions

No documentation for findUncaughtAssertions.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

hasColors

undocumented

Usage

hasColors

No documentation for hasColors.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

hasConsoleAnimation

undocumented

Usage

hasConsoleAnimation

No documentation for hasConsoleAnimation.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

insideDocker

undocumented

Usage

insideDocker

No documentation for insideDocker.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

cachedShaPipe

SHA1 checksum of standard input

Usage

cachedShaPipe [ cacheDirectory ] [ filename ]

Use textSHA --cache cacheDirectory instead

Arguments

  • cacheDirectory - Directory. Optional. The directory where cache files can be stored exclusively for this function. Supports a blank value to disable caching, otherwise, it must be a valid directory.
  • filename - File. Optional. File determine the sha value for.

Reads standard input

any file

Writes to standard output

String. A hexadecimal string which uniquely represents the data in stdin.

Examples

cachedShaPipe "$cacheDirectory" < "$fileName"
cachedShaPipe "$cacheDirectory" "$fileName0" "$fileName1"

Sample Output

cf7861b50054e8c680a9552917b43ec2b9edae2b

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

consoleColorMode

DEPRECATED, BUILD_COLORS_MODE no longer used or supported.

Usage

consoleColorMode [ --help ]

DEPRECATED, BUILD_COLORS_MODE no longer used or supported. Set colors to deal with dark or light-background consoles

Arguments

  • --help - Flag. Optional. Display this help.

Debugging settings

Append to the value of BUILD_DEBUG (a comma-delimited (,) list) and add these tokens to enable debugging:

  • BUILD_COLORS_MODE - Output the color mode when it is changed

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

newRelease

DEPRECATED 2025-10-03

Usage

newRelease

DEPRECATED 2025-10-03

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

debugOpenFiles

undocumented

Usage

debugOpenFiles

No documentation for debugOpenFiles.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

deprecatedTokensFile

Run deprecated tokens file search

Usage

deprecatedTokensFile

Run deprecated tokens file search

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

exampleFunction

This is a sample function with example code and patterns

Usage

exampleFunction [ --help ] [ --handler handler ] [ --easy ] binary remoteUrl [ --target target ] [ --path path ] [ --title title ] [ --name name ] [ --url url ] [ --callable callable ] [ -- ]

This is a sample function with example code and patterns used in Zesk Build. Without arguments, displays help.

Arguments

  • --help - Flag. Optional. Display this help.
  • --handler handler - Function. Optional. Use this error handler instead of the default error handler.
  • --easy - Flag. Optional. Easy mode.
  • binary - String. Required. The binary to look for.
  • remoteUrl - URL. Required. Remote URL.
  • --target target - File. Optional. File to create. File must exist.
  • --path path - Directory. Optional. Directory of path of thing.
  • --title title - String. Optional. Title of the thing.
  • --name name - String. Optional. Name of the thing.
  • --url url - URL. Optional. URL to download.
  • --callable callable - Callable. Optional. Function to call when url is downloaded.
  • -- - Flag. Optional. Stops command processing to enable arbitrary text to be passed as additional arguments without special meaning.

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

githubURLsToCSV

read urls one per line and output to a CSV

Usage

githubURLsToCSV

read urls one per line and output to a CSV Sleep 1 second between requests. No rush.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

isType

Bash types beyond type -t

Usage

isType

Bash types beyond type -t

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

processOpenPipes

Output the number of open files for a process ID

Usage

processOpenPipes [ --help ]

Output the number of open files for a process ID or group Not completed yet

Arguments

  • --help - Flag. Optional. Display this help.

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

bashPromptModule_binBuild

undocumented

Usage

bashPromptModule_binBuild

No documentation for bashPromptModule_binBuild.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

mapEnvironmentSed

Convert tokens in files to environment variable values

Arguments

  • environmentName - String. Optional. Map this value only. If not specified, all environment variables are mapped.
  • --prefix - String. Optional. Prefix character for tokens, defaults to {.
  • --suffix - String. Optional. Suffix character for tokens, defaults to }.
  • --help - Flag. Optional. Display this help.

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

isAbsolutePath

undocumented

Usage

isAbsolutePath

No documentation for isAbsolutePath.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

tomorrowDate

undocumented

Usage

tomorrowDate

No documentation for tomorrowDate.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

boxedHeading

undocumented

Usage

boxedHeading

No documentation for boxedHeading.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

lineFill

undocumented

Usage

lineFill

No documentation for lineFill.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

repeat

undocumented

Usage

repeat

No documentation for repeat.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

whichExists

undocumented

Usage

whichExists

No documentation for whichExists.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

whichHook

undocumented

Usage

whichHook

No documentation for whichHook.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

extensionLists

undocumented

Usage

extensionLists

No documentation for extensionLists.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

yesterdayDate

undocumented

Usage

yesterdayDate

No documentation for yesterdayDate.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

todayDate

undocumented

Usage

todayDate

No documentation for todayDate.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

tomorrowDate

undocumented

Usage

tomorrowDate

No documentation for tomorrowDate.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

buildFailed

Output debugging information when the build fails

Usage

buildFailed logFile [ message ]

Outputs debugging information after build fails: - last 50 lines in build log - Failed message - last 3 lines in build log

Arguments

  • logFile - File. Required. The most recent log from the current script.
  • message - String. Optional. Any additional message to output.

Examples

quietLog="$(buildQuietLog "$me")"
if ! ./bin/deploy.sh >>"$quietLog"; then
    decorate error "Deploy failed"
    buildFailed "$quietLog"
fi

Sample Output

stdout

Return codes

  • 1 - Always fails

makeShellFilesExecutable

undocumented

Usage

makeShellFilesExecutable

No documentation for makeShellFilesExecutable.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

echoBar

undocumented

Usage

echoBar

No documentation for echoBar.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

usageArgumentApplicationDirectory

Validates a value as an application-relative directory. Upon success, outputs

Usage

usageArgumentApplicationDirectory usageFunction variableName variableValue [ noun ]

Validates a value as an application-relative directory. Upon success, outputs relative path.

Arguments

  • usageFunction - Function. Required. Run if handler fails
  • variableName - String. Required. Name of variable being tested
  • variableValue - String. Required. Required. only in that if it's blank, it fails.
  • noun - String. Optional. Noun used to describe the argument in errors, defaults to directory list

Return codes

  • 2 - Argument error
  • 0 - Success

usageArgumentApplicationDirectoryList

Validates a value as an application-relative directory search list. Upon

Usage

usageArgumentApplicationDirectoryList usageFunction variableName variableValue [ noun ]

Validates a value as an application-relative directory search list. Upon success, outputs the entire list, cleans up any invalid values or trailing characters.

Arguments

  • usageFunction - Function. Required. Run if handler fails
  • variableName - String. Required. Name of variable being tested
  • variableValue - String. Required. Required. only in that if it's blank, it fails.
  • noun - String. Optional. Noun used to describe the argument in errors, defaults to directory list

Return codes

  • 2 - Argument error
  • 0 - Success

usageArgumentApplicationFile

Validates a value as an application-relative file. Upon success, outputs

Usage

usageArgumentApplicationFile usageFunction variableName variableValue [ noun ]

Validates a value as an application-relative file. Upon success, outputs relative path.

Arguments

  • usageFunction - Function. Required. Run if handler fails
  • variableName - String. Required. Name of variable being tested
  • variableValue - String. Required. Value to test.
  • noun - String. Optional. Noun used to describe the argument in errors, defaults to directory list

Return codes

  • 2 - Argument error
  • 0 - Success

usageArgumentArguments

Placeholder for additional arguments

Usage

usageArgumentArguments handler argument [ value ... ]

Placeholder for additional arguments

Arguments

  • handler - Function. Required. handler function to call upon failure.
  • argument - String. Required. Name of the argument used in error messages.
  • value ... - Arguments. Optional. Additional arguments.

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

usageArgumentArray

Placeholder for array types

Usage

usageArgumentArray handler argument

Placeholder for array types

Arguments

  • handler - Function. Required. handler function to call upon failure.
  • argument - String. Required. Name of the argument used in error messages.

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

usageArgumentBoolean

Require an argument to be a boolean value

Usage

usageArgumentBoolean handler argument [ value ]

Require an argument to be a boolean value

Arguments

  • handler - Function. Required. handler function to call upon failure.
  • argument - String. Required. Name of the argument used in error messages.
  • value - String. Optional. Value which should be non-blank otherwise an argument error is thrown.

Return codes

  • 2 - If value is not a boolean
  • 0 - If value is a boolean

usageArgumentCallable

Require an argument to be a callable

Usage

usageArgumentCallable handler argument [ value ]

Require an argument to be a callable

Arguments

  • handler - Function. Required. handler function to call upon failure.
  • argument - String. Required. Name of the argument used in error messages.
  • value - String. Optional. Value which should be callable otherwise an argument error is thrown.

Return codes

  • 2 - If value is not isCallable
  • 0 - If value is isCallable

usageArgumentColonDelimitedList

List delimited with colons :

Usage

usageArgumentColonDelimitedList handler argument

List delimited with colons :

Arguments

  • handler - Function. Required. handler function to call upon failure.
  • argument - String. Required. Name of the argument used in error messages.

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

usageArgumentCommaDelimitedList

List delimited with commas ,

Usage

usageArgumentCommaDelimitedList handler argument

List delimited with commas ,

Arguments

  • handler - Function. Required. handler function to call upon failure.
  • argument - String. Required. Name of the argument used in error messages.

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

usageArgumentDate

A remote path is one which exists in another file

Usage

usageArgumentDate handler argument

A remote path is one which exists in another file system

Arguments

  • handler - Function. Required. handler function to call upon failure.
  • argument - String. Required. Name of the argument used in error messages.

Return codes

  • 2 - Always

usageArgumentDirectory

Validates a value is not blank and is a directory.

Usage

usageArgumentDirectory usageFunction variableName variableValue [ noun ]

Validates a value is not blank and is a directory. Upon success, outputs the directory name trailing slash stripped.

Arguments

  • usageFunction - Function. Required. Run if handler fails
  • variableName - String. Required. Name of variable being tested
  • variableValue - String. Required. Required. only in that if it's blank, it fails.
  • noun - String. Optional. Noun used to describe the argument in errors, defaults to directory

Return codes

  • 2 - Argument error
  • 0 - Success

usageArgumentDirectoryList

Validates a value as a directory search list. Upon success,

Usage

usageArgumentDirectoryList usageFunction variableName variableValue [ noun ]

Validates a value as a directory search list. Upon success, outputs the entire list, cleans up any invalid values or trailing characters.

Arguments

  • usageFunction - Function. Required. Run if handler fails
  • variableName - String. Required. Name of variable being tested
  • variableValue - String. Required. Required. only in that if it's blank, it fails.
  • noun - String. Optional. Noun used to describe the argument in errors, defaults to directory list

Return codes

  • 2 - Argument error
  • 0 - Success

usageArgumentEmptyString

Do not require argument to be non-blank

Usage

usageArgumentEmptyString handler argument [ value ]

Do not require argument to be non-blank

Arguments

  • handler - Function. Required. handler function to call upon failure.
  • argument - String. Required. Name of the argument used in error messages.
  • value - String. Optional. Value to output.

Return codes

  • 0 - Always

usageArgumentEnvironmentVariable

Validates a value is ok for an environment variable name

Usage

usageArgumentEnvironmentVariable usageFunction variableName variableValue [ noun ]

Validates a value is ok for an environment variable name Upon success, outputs the name

Arguments

  • usageFunction - Function. Required. Run if handler fails
  • variableName - String. Required. Name of variable being tested
  • variableValue - String. Required. Environment variable name.
  • noun - String. Optional. Noun used to describe the argument in errors, defaults to environment variable

Return codes

  • 2 - Argument error
  • 0 - Success

usageArgumentExecutable

Require an argument to be a executable

Usage

usageArgumentExecutable handler argument [ value ]

Require an argument to be a executable

Arguments

  • handler - Function. Required. handler function to call upon failure.
  • argument - String. Required. Name of the argument used in error messages.
  • value - String. Optional. Value which should be executable otherwise an argument error is thrown.

Return codes

  • 2 - If value is not isExecutable
  • 0 - If value is isExecutable

usageArgumentExists

Validates a value is not blank and exists in the

Usage

usageArgumentExists usageFunction variableName variableValue [ noun ]

Validates a value is not blank and exists in the file system Upon success, outputs the file name

Arguments

  • usageFunction - Function. Required. Run if handler fails
  • variableName - String. Required. Name of variable being tested
  • variableValue - String. Required. Required. only in that if it's blank, it fails.
  • noun - String. Optional. Noun used to describe the argument in errors, defaults to file or directory

Return codes

  • 2 - Argument error
  • 0 - Success

usageArgumentFile

Validates a value is not blank and is a file.

Usage

usageArgumentFile usageFunction variableName variableValue [ noun ]

Validates a value is not blank and is a file. Upon success, outputs the file name

Arguments

  • usageFunction - Function. Required. Run if handler fails
  • variableName - String. Required. Name of variable being tested
  • variableValue - String. Required. Value to test.
  • noun - String. Optional. Noun used to describe the argument in errors, defaults to file

Return codes

  • 2 - Argument error
  • 0 - Success

usageArgumentFileDirectory

Validates a value is not blank and is a file

Usage

usageArgumentFileDirectory usageFunction variableName variableValue [ noun ]

Validates a value is not blank and is a file path with a directory that exists. Upon success, outputs the file name.

Arguments

  • usageFunction - Function. Required. Run if handler fails
  • variableName - String. Required. Name of variable being tested
  • variableValue - String. Required. Required. only in that if it's blank, it fails.
  • noun - String. Optional. Noun used to describe the argument in errors, defaults to file

Return codes

  • 2 - Argument error
  • 0 - Success

usageArgumentFlag

List delimited with colons :

Usage

usageArgumentFlag handler argument

List delimited with colons :

Arguments

  • handler - Function. Required. handler function to call upon failure.
  • argument - String. Required. Name of the argument used in error messages.

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

usageArgumentFunction

Require an argument to be a function

Usage

usageArgumentFunction handler argument [ value ]

Require an argument to be a function

Arguments

  • handler - Function. Required. handler function to call upon failure.
  • argument - String. Required. Name of the argument used in error messages.
  • value - String. Optional. Value which should be a function otherwise an argument error is thrown.

Return codes

  • 2 - If value is not isFunction
  • 0 - If value is isFunction

usageArgumentInteger

Validates a value is an integer

Usage

usageArgumentInteger usageFunction variableName variableValue [ noun ]

Validates a value is an integer

Arguments

  • usageFunction - Function. Required. Run if handler fails
  • variableName - String. Required. Name of variable being tested
  • variableValue - String. Required. Required. only in that if it's blank, it fails.
  • noun - String. Optional. Noun used to describe the argument in errors, defaults to integer

Return codes

  • 2 - Argument error
  • 0 - Success

Validates a value is not blank and is a link

Usage

usageArgumentLink usageFunction variableName variableValue [ noun ]

Validates a value is not blank and is a link Upon success, outputs the file name

Arguments

  • usageFunction - Function. Required. Run if handler fails
  • variableName - String. Required. Name of variable being tested
  • variableValue - String. Required. Path to a link file.
  • noun - String. Optional. Noun used to describe the argument in errors, defaults to link

Return codes

  • 2 - Argument error
  • 0 - Success

usageArgumentList

List delimited with spaces

Usage

usageArgumentList handler argument

List delimited with spaces

Arguments

  • handler - Function. Required. handler function to call upon failure.
  • argument - String. Required. Name of the argument used in error messages.

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

usageArgumentLoadEnvironmentFile

Validates a value is not blank and is an environment

Usage

usageArgumentLoadEnvironmentFile usageFunction variableName variableValue [ noun ]

Validates a value is not blank and is an environment file which is loaded immediately. Upon success, outputs the file name to stdout, outputs a console message to stderr

Arguments

  • usageFunction - Function. Required. Run if handler fails
  • variableName - String. Required. Name of variable being tested
  • variableValue - String. Required. Required. only in that if it's blank, it fails.
  • noun - String. Optional. Noun used to describe the argument in errors, defaults to file

Return codes

  • 2 - Argument error
  • 0 - Success

usageArgumentNumber

Validates a value is a number

Usage

usageArgumentNumber usageFunction variableName variableValue [ noun ]

Validates a value is a number

Arguments

  • usageFunction - Function. Required. Run if handler fails
  • variableName - String. Required. Name of variable being tested
  • variableValue - String. Required. Required. only in that if it's blank, it fails.
  • noun - String. Optional. Noun used to describe the argument in errors, defaults to integer

Return codes

  • 2 - Argument error
  • 0 - Success

usageArgumentPositiveInteger

Validates a value is an positive integer and greater than

Usage

usageArgumentPositiveInteger usageFunction variableName variableValue

Validates a value is an positive integer and greater than zero (NOT zero)

Arguments

  • usageFunction - Function. Required. Run if handler fails
  • variableName - String. Required. Name of variable being tested
  • variableValue - String. Required. Required. only in that if it's blank, it fails.

Return codes

  • 2 - Argument error
  • 0 - Success

usageArgumentRealDirectory

Validates a value is not blank and is a directory

Usage

usageArgumentRealDirectory usageFunction variableName variableValue [ noun ]

Validates a value is not blank and is a directory and does fileRealPath on it.

Arguments

  • usageFunction - Function. Required. Run if handler fails
  • variableName - String. Required. Name of variable being tested
  • variableValue - String. Required. Required. only in that if it's blank, it fails.
  • noun - String. Optional. Noun used to describe the argument in errors, defaults to directory

Return codes

  • 2 - Argument error
  • 0 - Success

usageArgumentRealFile

Validates a value is not blank and is a file

Usage

usageArgumentRealFile usageFunction variableName variableValue [ noun ]

Validates a value is not blank and is a file and does fileRealPath on it.

Arguments

  • usageFunction - Function. Required. Run if handler fails
  • variableName - String. Required. Name of variable being tested
  • variableValue - String. Required. Value to test.
  • noun - String. Optional. Noun used to describe the argument in errors, defaults to file

Return codes

  • 2 - Argument error
  • 0 - Success

usageArgumentRemoteDirectory

A remote path is one which exists in another file

Usage

usageArgumentRemoteDirectory handler argument

A remote path is one which exists in another file system

Arguments

  • handler - Function. Required. handler function to call upon failure.
  • argument - String. Required. Name of the argument used in error messages.

Return codes

  • 2 - Always

usageArgumentSecret

Secrets are things which should be kept secret

Usage

usageArgumentSecret handler argument

Secrets are things which should be kept secret

Arguments

  • handler - Function. Required. handler function to call upon failure.
  • argument - String. Required. Name of the argument used in error messages.

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

usageArgumentString

Require an argument to be non-blank

Usage

usageArgumentString handler argument [ value ]

Require an argument to be non-blank

Arguments

  • handler - Function. Required. Usage function to call upon failure.
  • argument - String. Required. Name of the argument used in error messages.
  • value - String. Optional. Value which should be non-blank otherwise an argument error is thrown.

Return codes

  • 2 - If value is blank
  • 0 - If value is non-blank

usageArgumentUnsignedInteger

Validates a value is an unsigned integer and greater than

Usage

usageArgumentUnsignedInteger usageFunction variableName variableValue [ noun ]

Validates a value is an unsigned integer and greater than zero (or equal to zero)

Arguments

  • usageFunction - Function. Required. Run if handler fails
  • variableName - String. Required. Name of variable being tested
  • variableValue - String. Required. Required. only in that if it's blank, it fails.
  • noun - String. Optional. Noun used to describe the argument in errors, defaults to unsigned integer

Return codes

  • 2 - Argument error
  • 0 - Success

usageArgumentURL

Require an argument to be a URL

Usage

usageArgumentURL handler argument [ value ]

Require an argument to be a URL

Arguments

  • handler - Function. Required. handler function to call upon failure.
  • argument - String. Required. Name of the argument used in error messages.
  • value - String. Optional. Value which should be a URL otherwise an argument error is thrown.

Return codes

  • 0 - If value is urlValid
  • 2 - If value is not urlValid

maximumFieldLength

undocumented

Usage

maximumFieldLength

No documentation for maximumFieldLength.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

maximumLineLength

undocumented

Usage

maximumLineLength

No documentation for maximumLineLength.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

clearLine

undocumented

Usage

clearLine

No documentation for clearLine.

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

🛠️ Tools · ⬅ Top