registry-class: A registry contains a list of all currently defined...

Description Fields Methods

Description

A registry contains a list of all currently defined environment variables, with utilities for evaluating references to other variables. Not meant for external usage.

Fields

vars

A named list of environment variables.

export_pattern

Regular expression for finding export statements in environment files.

var_pattern

Regular expression for identifying variable references.

variable_pattern

Regular expression for finding variable declarations.

comment_pattern

Regular expression for identifying comments

Methods

evaluate(v)

Evaluate the value of the variable.

get(k)

Retrieve the value of a variable.

initialize()

Create a new registry and initialize vars to all variables from current session.

load(env_file)

Load an environment file and set all exported variables.

set(k, v)

Add a new variable to the registry, and evaluate for references to other variables.


drewlanenga/bashr documentation built on June 5, 2017, 3:10 a.m.