LOCAL(1)

NAME

local - declare variables local to the current function invocation.

SYNOPSIS

local [name[=value] ...]

DESCRIPTION

local declares variables local to the current function invocation. It may only be used while a shell function is running. With no operands, it succeeds without changing state.

Each operand must be a valid shell variable name or assignment. If a name is declared without an explicit value, Rush initializes the local from a matching assignment prefix when one is present; otherwise the local starts unset.

EXIT STATUS

Zero on success, one when used outside a function, and two for invalid variable names or readonly variables.

SEE ALSO

rush-builtins(7).