CmdLang

Language interface for making commands.

Important syntax of the language used in command line or shell are captured so that CmdBuilder can use them in a language-agnostic manner.

Inheritors

Types

Link copied to clipboard
open class DiffIgnoreFlag(val flagsMap: Map<Settings.DiffIgnoreFlag, String>)

An interface for diff ignore flags that allows for choosing implementations.

Link copied to clipboard
class HereDoc(val heredocDelimiters: Pair<String, String>)

Heredoc definition utilities

Properties

Link copied to clipboard
abstract val DEFAULT_EXITCODE: Int

Default exitcode of a variable if stage execution timed out.

Link copied to clipboard
abstract val hereDoc: CmdLang.HereDoc

Heredoc with certain delimiters under this CmdLang.

Functions

Link copied to clipboard
abstract fun catFile(path: String): String

Read-out file into stdout

Link copied to clipboard
abstract fun deref(variable: String): String

Interpret the variable if it is defined the command line environment by dereferencing.

Link copied to clipboard
abstract fun exitCmd(exitcode: String): String

Command for exiting with a given exitcode integer or expression.

Link copied to clipboard
abstract fun expand(cmd: String): String

Expand and interpret the command expression in the shell, so that it can be used to construct further commands by substituting.

Link copied to clipboard
abstract fun <T> from(result: CmdUtils.Var.Result<T>): String

Command building combinators to pipe contents from previously saved Var.baseName's stdout/stderr.

Link copied to clipboard
abstract fun makeHeredoc(content: String): String

Command building combinator to make heredocs normally. Usually to be registed into a Var or piped into other commands.

Link copied to clipboard
abstract fun makePipedHeredoc(content: String, pipeToCmd: String): String

Command building combinator to make heredocs and then have a command to pipe the heredoc into. Usually to be registed into a Var or piped into other commands.

Link copied to clipboard
abstract fun print(content: String): String

Command to print content into the console.

Link copied to clipboard
open operator fun String.rangeTo(rest: String): String

Command building combinator to concat different parts of the command with proper spacing.